Skip to content

Exolympiaduserinfo

Featured Replies

Hello. I use interlude project based on aCis and when i tested Olympiad i had some problems.

 

1.There was no countdown before game started. fixed

2.You have to push ctrl+attack to attack player. fixed

3.Windows which shows your opponents cp/hp don't work

 

I can't fix third one and can anyone help me with that?

 

I think it is problem of ExOlympiadUserInfo.

 

 

public class ExOlympiadUserInfo extends L2GameServerPacket
{
private final L2PlayerInstance _player;
private Participant _par = null;
private int _curHp;
private int _maxHp;
private int _curCp;
private int _maxCp;
 
public ExOlympiadUserInfo(L2PlayerInstance player)
{
_player = player;
 
if (_player != null)
{
_curHp = (int)_player.getCurrentHp();
_maxHp = _player.getMaxHp();
_curCp = (int)_player.getCurrentCp();
_maxCp = _player.getMaxCp();
}
else
{
_curHp = 0;
_maxHp = 100;
_curCp = 0;
_maxCp = 100;
}
}
 
public ExOlympiadUserInfo(Participant par)
{
_par = par;
_player = par.player;
 
if (_player != null)
{
_curHp = (int)_player.getCurrentHp();
_maxHp = _player.getMaxHp();
_curCp = (int)_player.getCurrentCp();
_maxCp = _player.getMaxCp();
}
else
{
_curHp = 0;
_maxHp = 100;
_curCp = 0;
_maxCp = 100;
}
}
 
@Override
protected final void writeImpl()
{
writeC(0xfe);
writeH(0x29);
if (_player != null)
{
writeC(_player.getOlympiadSide());
writeD(_player.getObjectId());
writeS(_player.getName());
writeD(_player.getClassId().getId());
}
else
{
writeC(_par.side);
writeD(_par.objectId);
writeS(_par.name);
writeD(_par.baseClass);
}
writeD(_curHp);
writeD(_maxHp);
writeD(_curCp);
writeD(_maxCp);
}
}

Sorry, but ExOlympiadUserInfo hasn't changed since it's original inception in C4 - same old in IL, HF, etc.

 

<packet id="SM_EX_OLYMPIAD_USER_INFO">
	<byte alias="Side" type="OlympiadSide" />
	<dword alias="Player OID" type="ObjectID" />
	<string alias="Name" />
	<dword alias="Class" type="CharacterClass" />
	<dword alias="Current HP" /> <!-- real -->
	<dword alias="Maximum HP" /> <!-- real -->
	<dword alias="Current CP" />
	<dword alias="Maximum CP" />
</packet>
FE:29:00 is the correct opcode for IL.

 

So writeImpl() is correct and there's really not much else to be said about the code you pasted.

I'd suggest checking if these packets are actually sent (and if so, with what data).

L2JPes is like 2 if not 3 years old. What you described is a bug I fixed since a while. L2JPes was based on aCis rev 290.

 

From this post : http://acis.i-live.eu/index.php?topic=30.msg18013#msg18013 you read the 4 next pages and it's all issues you will have using it.

 

The issue you are speaking about is fixed on 301 : http://acis.i-live.eu/index.php?topic=30.msg20572#msg20572

Edited by Tryskell

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.