Renamed idTemplate to displayId.

This commit is contained in:
MobiusDevelopment
2020-06-15 22:34:40 +00:00
parent 7d8e78bb6d
commit 7de9daa055
45 changed files with 6346 additions and 6349 deletions

View File

@@ -39,7 +39,7 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
protected int _y;
protected int _z;
protected int _heading;
protected int _idTemplate;
protected int _displayId;
protected boolean _isAttackable;
protected boolean _isSummoned;
protected int _mAtkSpd;
@@ -108,7 +108,7 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
{
super(cha, attacker.canOverrideCond(PlayerCondOverride.SEE_ALL_PLAYERS));
_npc = cha;
_idTemplate = cha.getTemplate().getDisplayId(); // On every subclass
_displayId = cha.getTemplate().getDisplayId(); // On every subclass
_rhand = cha.getRightHandItem(); // On every subclass
_lhand = cha.getLeftHandItem(); // On every subclass
_enchantEffect = cha.getEnchantEffect();
@@ -142,7 +142,7 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
{
OutgoingPackets.NPC_INFO.writeId(packet);
packet.writeD(_npc.getObjectId());
packet.writeD(_idTemplate + 1000000); // npctype id
packet.writeD(_displayId + 1000000); // npctype id
packet.writeD(_isAttackable ? 1 : 0);
packet.writeD(_x);
packet.writeD(_y);
@@ -267,7 +267,7 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
super(cha, (attacker != null) && attacker.canOverrideCond(PlayerCondOverride.SEE_ALL_PLAYERS));
_trap = cha;
_idTemplate = cha.getTemplate().getDisplayId();
_displayId = cha.getTemplate().getDisplayId();
_isAttackable = cha.isAutoAttackable(attacker);
_rhand = 0;
_lhand = 0;
@@ -285,7 +285,7 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
{
OutgoingPackets.NPC_INFO.writeId(packet);
packet.writeD(_trap.getObjectId());
packet.writeD(_idTemplate + 1000000); // npctype id
packet.writeD(_displayId + 1000000); // npctype id
packet.writeD(_isAttackable ? 1 : 0);
packet.writeD(_x);
packet.writeD(_y);
@@ -368,7 +368,7 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
_enchantEffect = cha.getTemplate().getWeaponEnchant();
_name = cha.getName();
_title = (cha.getOwner() != null) && cha.getOwner().isOnline() ? cha.getOwner().getName() : "";
_idTemplate = cha.getTemplate().getDisplayId();
_displayId = cha.getTemplate().getDisplayId();
_collisionHeight = cha.getTemplate().getfCollisionHeight();
_collisionRadius = cha.getTemplate().getfCollisionRadius();
}
@@ -378,7 +378,7 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
{
OutgoingPackets.NPC_INFO.writeId(packet);
packet.writeD(_summon.getObjectId());
packet.writeD(_idTemplate + 1000000); // npctype id
packet.writeD(_displayId + 1000000); // npctype id
packet.writeD(_isAttackable ? 1 : 0);
packet.writeD(_x);
packet.writeD(_y);

View File

@@ -31,7 +31,7 @@ public class ServerObjectInfo implements IClientOutgoingPacket
private final int _y;
private final int _z;
private final int _heading;
private final int _idTemplate;
private final int _displayId;
private final boolean _isAttackable;
private final double _collisionHeight;
private final double _collisionRadius;
@@ -40,7 +40,7 @@ public class ServerObjectInfo implements IClientOutgoingPacket
public ServerObjectInfo(Npc activeChar, Creature actor)
{
_activeChar = activeChar;
_idTemplate = _activeChar.getTemplate().getDisplayId();
_displayId = _activeChar.getTemplate().getDisplayId();
_isAttackable = _activeChar.isAutoAttackable(actor);
_collisionHeight = _activeChar.getCollisionHeight();
_collisionRadius = _activeChar.getCollisionRadius();
@@ -56,7 +56,7 @@ public class ServerObjectInfo implements IClientOutgoingPacket
{
OutgoingPackets.SERVER_OBJECT_INFO.writeId(packet);
packet.writeD(_activeChar.getObjectId());
packet.writeD(_idTemplate + 1000000);
packet.writeD(_displayId + 1000000);
packet.writeS(_name); // name
packet.writeD(_isAttackable ? 1 : 0);
packet.writeD(_x);