Sync with L2JServer Feb 7th 2015.
This commit is contained in:
@ -21,6 +21,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.instancemanager.MentorManager;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
@ -29,7 +30,7 @@ import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
public final class CreatureSay extends L2GameServerPacket
|
||||
{
|
||||
private final int _objectId;
|
||||
private final int _textType;
|
||||
private final ChatType _textType;
|
||||
private String _charName = null;
|
||||
private int _charId = 0;
|
||||
private String _text = null;
|
||||
@ -45,7 +46,7 @@ public final class CreatureSay extends L2GameServerPacket
|
||||
* @param messageType
|
||||
* @param text
|
||||
*/
|
||||
public CreatureSay(L2PcInstance sender, L2PcInstance receiver, String name, int messageType, String text)
|
||||
public CreatureSay(L2PcInstance sender, L2PcInstance receiver, String name, ChatType messageType, String text)
|
||||
{
|
||||
_objectId = sender.getObjectId();
|
||||
_charName = name;
|
||||
@ -82,7 +83,7 @@ public final class CreatureSay extends L2GameServerPacket
|
||||
* @param charName
|
||||
* @param text
|
||||
*/
|
||||
public CreatureSay(int objectId, int messageType, String charName, String text)
|
||||
public CreatureSay(int objectId, ChatType messageType, String charName, String text)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
@ -90,7 +91,7 @@ public final class CreatureSay extends L2GameServerPacket
|
||||
_text = text;
|
||||
}
|
||||
|
||||
public CreatureSay(L2PcInstance player, int messageType, String text)
|
||||
public CreatureSay(L2PcInstance player, ChatType messageType, String text)
|
||||
{
|
||||
_objectId = player.getObjectId();
|
||||
_textType = messageType;
|
||||
@ -98,7 +99,7 @@ public final class CreatureSay extends L2GameServerPacket
|
||||
_text = text;
|
||||
}
|
||||
|
||||
public CreatureSay(int objectId, int messageType, int charId, NpcStringId npcString)
|
||||
public CreatureSay(int objectId, ChatType messageType, int charId, NpcStringId npcString)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
@ -106,7 +107,7 @@ public final class CreatureSay extends L2GameServerPacket
|
||||
_npcString = npcString.getId();
|
||||
}
|
||||
|
||||
public CreatureSay(int objectId, int messageType, String charName, NpcStringId npcString)
|
||||
public CreatureSay(int objectId, ChatType messageType, String charName, NpcStringId npcString)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
@ -114,7 +115,7 @@ public final class CreatureSay extends L2GameServerPacket
|
||||
_npcString = npcString.getId();
|
||||
}
|
||||
|
||||
public CreatureSay(int objectId, int messageType, int charId, SystemMessageId sysString)
|
||||
public CreatureSay(int objectId, ChatType messageType, int charId, SystemMessageId sysString)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
@ -140,7 +141,7 @@ public final class CreatureSay extends L2GameServerPacket
|
||||
{
|
||||
writeC(0x4A);
|
||||
writeD(_objectId);
|
||||
writeD(_textType);
|
||||
writeD(_textType.getClientId());
|
||||
if (_charName != null)
|
||||
{
|
||||
writeS(_charName);
|
||||
@ -153,7 +154,7 @@ public final class CreatureSay extends L2GameServerPacket
|
||||
if (_text != null)
|
||||
{
|
||||
writeS(_text);
|
||||
if ((_charLevel > 0) && (_textType == 2))
|
||||
if ((_charLevel > 0) && (_textType == ChatType.TELL))
|
||||
{
|
||||
writeC(_mask);
|
||||
if ((_mask & 0x10) == 0)
|
||||
@ -174,7 +175,7 @@ public final class CreatureSay extends L2GameServerPacket
|
||||
@Override
|
||||
public final void runImpl()
|
||||
{
|
||||
L2PcInstance _pci = getClient().getActiveChar();
|
||||
final L2PcInstance _pci = getClient().getActiveChar();
|
||||
if (_pci != null)
|
||||
{
|
||||
_pci.broadcastSnoop(_textType, _charName, _text);
|
||||
|
@ -21,6 +21,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.enums.SubclassInfoType;
|
||||
import com.l2jserver.gameserver.enums.SubclassType;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.base.SubClass;
|
||||
@ -31,18 +32,17 @@ import com.l2jserver.gameserver.model.base.SubClass;
|
||||
public class ExSubjobInfo extends L2GameServerPacket
|
||||
{
|
||||
private final int _currClassId;
|
||||
private final int _currClassIndex;
|
||||
private final int _currRace;
|
||||
private final int _type;
|
||||
private final List<SubInfo> _subs;
|
||||
|
||||
public ExSubjobInfo(L2PcInstance player)
|
||||
public ExSubjobInfo(L2PcInstance player, SubclassInfoType type)
|
||||
{
|
||||
_subs = new ArrayList<>();
|
||||
|
||||
_currClassId = player.getClassId().getId();
|
||||
_currClassIndex = player.getClassIndex();
|
||||
_currRace = player.getRace().ordinal();
|
||||
_type = type.ordinal();
|
||||
|
||||
_subs = new ArrayList<>();
|
||||
_subs.add(0, new SubInfo(player));
|
||||
|
||||
for (SubClass sub : player.getSubClasses().values())
|
||||
@ -100,7 +100,7 @@ public class ExSubjobInfo extends L2GameServerPacket
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xEA);
|
||||
writeC(_currClassIndex);
|
||||
writeC(_type);
|
||||
writeD(_currClassId);
|
||||
writeD(_currRace);
|
||||
writeD(_subs.size());
|
||||
|
@ -21,6 +21,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
@ -30,7 +31,7 @@ import com.l2jserver.gameserver.network.NpcStringId;
|
||||
public final class NpcSay extends L2GameServerPacket
|
||||
{
|
||||
private final int _objectId;
|
||||
private final int _textType;
|
||||
private final ChatType _textType;
|
||||
private final int _npcId;
|
||||
private String _text;
|
||||
private final int _npcString;
|
||||
@ -42,7 +43,7 @@ public final class NpcSay extends L2GameServerPacket
|
||||
* @param npcId
|
||||
* @param text
|
||||
*/
|
||||
public NpcSay(int objectId, int messageType, int npcId, String text)
|
||||
public NpcSay(int objectId, ChatType messageType, int npcId, String text)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
@ -51,7 +52,7 @@ public final class NpcSay extends L2GameServerPacket
|
||||
_text = text;
|
||||
}
|
||||
|
||||
public NpcSay(L2Npc npc, int messageType, String text)
|
||||
public NpcSay(L2Npc npc, ChatType messageType, String text)
|
||||
{
|
||||
_objectId = npc.getObjectId();
|
||||
_textType = messageType;
|
||||
@ -60,7 +61,7 @@ public final class NpcSay extends L2GameServerPacket
|
||||
_text = text;
|
||||
}
|
||||
|
||||
public NpcSay(int objectId, int messageType, int npcId, NpcStringId npcString)
|
||||
public NpcSay(int objectId, ChatType messageType, int npcId, NpcStringId npcString)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
@ -68,7 +69,7 @@ public final class NpcSay extends L2GameServerPacket
|
||||
_npcString = npcString.getId();
|
||||
}
|
||||
|
||||
public NpcSay(L2Npc npc, int messageType, NpcStringId npcString)
|
||||
public NpcSay(L2Npc npc, ChatType messageType, NpcStringId npcString)
|
||||
{
|
||||
_objectId = npc.getObjectId();
|
||||
_textType = messageType;
|
||||
@ -119,7 +120,7 @@ public final class NpcSay extends L2GameServerPacket
|
||||
{
|
||||
writeC(0x30);
|
||||
writeD(_objectId);
|
||||
writeD(_textType);
|
||||
writeD(_textType.getClientId());
|
||||
writeD(_npcId);
|
||||
writeD(_npcString);
|
||||
if (_npcString == -1)
|
||||
|
@ -85,7 +85,7 @@ public final class RelationChanged extends L2GameServerPacket
|
||||
{
|
||||
if (activeChar.isInvisible())
|
||||
{
|
||||
_log.severe("Cannot add invisible character to multi relation packet.");
|
||||
// _log.severe("Cannot add invisible character to multi relation packet.");
|
||||
return;
|
||||
}
|
||||
Relation r = new Relation();
|
||||
|
@ -18,15 +18,17 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
|
||||
public class Snoop extends L2GameServerPacket
|
||||
{
|
||||
private final int _convoId;
|
||||
private final String _name;
|
||||
private final int _type;
|
||||
private final ChatType _type;
|
||||
private final String _speaker;
|
||||
private final String _msg;
|
||||
|
||||
public Snoop(int id, String name, int type, String speaker, String msg)
|
||||
public Snoop(int id, String name, ChatType type, String speaker, String msg)
|
||||
{
|
||||
_convoId = id;
|
||||
_name = name;
|
||||
@ -43,7 +45,7 @@ public class Snoop extends L2GameServerPacket
|
||||
writeD(_convoId);
|
||||
writeS(_name);
|
||||
writeD(0x00); // ??
|
||||
writeD(_type);
|
||||
writeD(_type.getClientId());
|
||||
writeS(_speaker);
|
||||
writeS(_msg);
|
||||
|
||||
|
@ -243,7 +243,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
writeD(_activeChar.getX());
|
||||
writeD(_activeChar.getY());
|
||||
writeD(_activeChar.getZ());
|
||||
writeD(_activeChar.getHeading());
|
||||
writeD(_activeChar.isInVehicle() ? _activeChar.getVehicle().getObjectId() : 0);
|
||||
}
|
||||
|
||||
if (containsMask(UserInfoType.SPEED))
|
||||
|
Reference in New Issue
Block a user