|
@@ -26,8 +26,10 @@ public final class CreatureSay extends L2GameServerPacket
|
|
|
private static final String _S__4A_CREATURESAY = "[S] 4A CreatureSay";
|
|
|
private int _objectId;
|
|
|
private int _textType;
|
|
|
- private String _charName;
|
|
|
- private String _text;
|
|
|
+ private String _charName = null;
|
|
|
+ private int _charId = 0;
|
|
|
+ private String _text = null;
|
|
|
+ private int _msgId = 0;
|
|
|
|
|
|
/**
|
|
|
* @param _characters
|
|
@@ -40,16 +42,30 @@ public final class CreatureSay extends L2GameServerPacket
|
|
|
_text = text;
|
|
|
}
|
|
|
|
|
|
+ public CreatureSay(int objectId, int messageType, int charId, int msgId)
|
|
|
+ {
|
|
|
+ _objectId = objectId;
|
|
|
+ _textType = messageType;
|
|
|
+ _charId = charId;
|
|
|
+ _msgId = msgId;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
protected final void writeImpl()
|
|
|
{
|
|
|
writeC(0x4a);
|
|
|
writeD(_objectId);
|
|
|
writeD(_textType);
|
|
|
- writeS(_charName);
|
|
|
- writeS(_text);
|
|
|
+ if (_charName != null)
|
|
|
+ writeS(_charName);
|
|
|
+ else
|
|
|
+ writeD(_charId);
|
|
|
+ if (_text != null)
|
|
|
+ writeS(_text);
|
|
|
+ else
|
|
|
+ writeD(_msgId);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
public final void runImpl()
|
|
|
{
|
|
@@ -68,5 +84,4 @@ public final class CreatureSay extends L2GameServerPacket
|
|
|
{
|
|
|
return _S__4A_CREATURESAY;
|
|
|
}
|
|
|
-
|
|
|
}
|