Renamed idTemplate to displayId.
This commit is contained in:
parent
7d8e78bb6d
commit
7de9daa055
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
@ -4,7 +4,7 @@
|
||||
DROP TABLE IF EXISTS `custom_npc`;
|
||||
CREATE TABLE `custom_npc`(
|
||||
`id` decimal(11,0) NOT NULL default '0',
|
||||
`idTemplate` int(11) NOT NULL default '0',
|
||||
`displayId` int(11) NOT NULL default '0',
|
||||
`name` varchar(200) default NULL,
|
||||
`serverSideName` int(1) default '0',
|
||||
`title` varchar(45) default '',
|
||||
|
@ -5,7 +5,7 @@ SET FOREIGN_KEY_CHECKS=0;
|
||||
DROP TABLE IF EXISTS `npc`;
|
||||
CREATE TABLE `npc` (
|
||||
`id` decimal(11,0) NOT NULL DEFAULT '0',
|
||||
`idTemplate` int(11) NOT NULL DEFAULT '0',
|
||||
`displayId` int(11) NOT NULL DEFAULT '0',
|
||||
`name` varchar(200) DEFAULT NULL,
|
||||
`serverSideName` int(1) DEFAULT '0',
|
||||
`title` varchar(45) DEFAULT '',
|
||||
|
@ -8,7 +8,7 @@ UPDATE `spawnlist` SET `locx` = '85584', `locy` = '-18224', `locz` = '-1819' WHE
|
||||
UPDATE `clanhall` SET `location` = 'BeastFarm' WHERE `id` = '63';
|
||||
|
||||
-- Insert new NPCs
|
||||
INSERT IGNORE INTO `npc` (`id`,`idTemplate`,`name`,`serverSideName`,`title`,`serverSideTitle`,`class`,`collision_radius`,`collision_height`,`level`,`sex`,`type`,`attackrange`,`hp`,`mp`,`hpreg`,`mpreg`,`str`,`con`,`dex`,`int`,`wit`,`men`,`exp`,`sp`,`patk`,`pdef`,`matk`,`mdef`,`atkspd`,`aggro`,`matkspd`,`rhand`,`lhand`,`armor`,`walkspd`,`runspd`,`faction_id`,`faction_range`,`isUndead`,`absorb_level`,`absorb_type`) VALUES
|
||||
INSERT IGNORE INTO `npc` (`id`,`displayId`,`name`,`serverSideName`,`title`,`serverSideTitle`,`class`,`collision_radius`,`collision_height`,`level`,`sex`,`type`,`attackrange`,`hp`,`mp`,`hpreg`,`mpreg`,`str`,`con`,`dex`,`int`,`wit`,`men`,`exp`,`sp`,`patk`,`pdef`,`matk`,`mdef`,`atkspd`,`aggro`,`matkspd`,`rhand`,`lhand`,`armor`,`walkspd`,`runspd`,`faction_id`,`faction_range`,`isUndead`,`absorb_level`,`absorb_type`) VALUES
|
||||
(75003,31366,'Cole',1,'Beast Manager',1,'NPC.a_traderD_Mhuman',8.00,25.30,70,'male','ClanHallManager',40,3862,3059,11.85,2.78,40,43,30,21,20,10,0,0,1314,470,780,382,278,0,333,0,0,0,55,132,NULL,0,1,0,'LAST_HIT'),
|
||||
(75004,31537,'Tom',1,'Beast Keeper',1,'NPC.a_common_peopleC_Mhuman',10.00,24.00,70,'male','Doorman',40,3862,1493,11.85,2.78,40,43,30,21,20,10,0,0,1314,470,780,382,278,0,333,0,0,0,55,132,NULL,0,1,0,'LAST_HIT'),
|
||||
(75005,31537,'Richard',1,'Beast Keeper',1,'NPC.a_common_peopleC_Mhuman',10.00,24.00,70,'male','Doorman',40,3862,1493,11.85,2.78,40,43,30,21,20,10,0,0,1314,470,780,382,278,0,333,0,0,0,55,132,NULL,0,1,0,'LAST_HIT'),
|
||||
@ -97,7 +97,7 @@ INSERT IGNORE INTO teleport VALUES
|
||||
--
|
||||
|
||||
-- Insert new NPCs
|
||||
INSERT IGNORE INTO `npc` (`id`,`idTemplate`,`name`,`serverSideName`,`title`,`serverSideTitle`,`class`,`collision_radius`,`collision_height`,`level`,`sex`,`type`,`attackrange`,`hp`,`mp`,`hpreg`,`mpreg`,`str`,`con`,`dex`,`int`,`wit`,`men`,`exp`,`sp`,`patk`,`pdef`,`matk`,`mdef`,`atkspd`,`aggro`,`matkspd`,`rhand`,`lhand`,`armor`,`walkspd`,`runspd`,`faction_id`,`faction_range`,`isUndead`,`absorb_level`,`absorb_type`) VALUES
|
||||
INSERT IGNORE INTO `npc` (`id`,`displayId`,`name`,`serverSideName`,`title`,`serverSideTitle`,`class`,`collision_radius`,`collision_height`,`level`,`sex`,`type`,`attackrange`,`hp`,`mp`,`hpreg`,`mpreg`,`str`,`con`,`dex`,`int`,`wit`,`men`,`exp`,`sp`,`patk`,`pdef`,`matk`,`mdef`,`atkspd`,`aggro`,`matkspd`,`rhand`,`lhand`,`armor`,`walkspd`,`runspd`,`faction_id`,`faction_range`,`isUndead`,`absorb_level`,`absorb_type`) VALUES
|
||||
(75007,21591,'Carrie',1,'Undead Matron',1,'Monster2.vampire_wizard',5.50,28.00,73,'female','ClanHallManager',40,4086,3059,13.43,3.09,40,43,30,21,20,10,0,0,1770,415,885,407,278,0,333,99,0,0,50,198,NULL,300,0,0,'LAST_HIT'),
|
||||
(75008,21587,'Freddy',1,'Undead Butler',1,'Monster2.vampire_soldier_20_bi',10.00,29.00,72,'male','Doorman',40,4013,1565,13.43,3.09,40,43,30,21,20,10,0,0,1710,406,849,399,278,0,333,234,0,0,66,209,NULL,300,0,0,'LAST_HIT'),
|
||||
(75009,21587,'Hannibal',1,'Undead Butler',1,'Monster2.vampire_soldier_20_bi',10.00,29.00,72,'male','Doorman',40,4013,1565,13.43,3.09,40,43,30,21,20,10,0,0,1710,406,849,399,278,0,333,234,0,0,66,209,NULL,300,0,0,'LAST_HIT'),
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -274,7 +274,7 @@ public class NpcTable
|
||||
final StatSet npcDat = new StatSet();
|
||||
final int id = npcData.getInt("id");
|
||||
npcDat.set("npcId", id);
|
||||
npcDat.set("idTemplate", npcData.getInt("idTemplate"));
|
||||
npcDat.set("displayId", npcData.getInt("displayId"));
|
||||
|
||||
// Level: for special bosses could be different
|
||||
int level = 0;
|
||||
@ -485,12 +485,12 @@ public class NpcTable
|
||||
npcDat.set("baseRunSpd", npcData.getInt("runspd"));
|
||||
|
||||
// constants, until we have stats in DB
|
||||
npcDat.safeSet("baseSTR", npcData.getInt("str"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
|
||||
npcDat.safeSet("baseCON", npcData.getInt("con"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
|
||||
npcDat.safeSet("baseDEX", npcData.getInt("dex"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
|
||||
npcDat.safeSet("baseINT", npcData.getInt("int"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
|
||||
npcDat.safeSet("baseWIT", npcData.getInt("wit"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
|
||||
npcDat.safeSet("baseMEN", npcData.getInt("men"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
|
||||
npcDat.safeSet("baseSTR", npcData.getInt("str"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("displayId"));
|
||||
npcDat.safeSet("baseCON", npcData.getInt("con"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("displayId"));
|
||||
npcDat.safeSet("baseDEX", npcData.getInt("dex"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("displayId"));
|
||||
npcDat.safeSet("baseINT", npcData.getInt("int"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("displayId"));
|
||||
npcDat.safeSet("baseWIT", npcData.getInt("wit"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("displayId"));
|
||||
npcDat.safeSet("baseMEN", npcData.getInt("men"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("displayId"));
|
||||
npcDat.set("baseCpMax", 0);
|
||||
npcDat.set("factionId", npcData.getString("faction_id"));
|
||||
npcDat.set("factionRange", npcData.getInt("faction_range"));
|
||||
|
@ -824,7 +824,7 @@ public class AdminEditNpc implements IAdminCommandHandler
|
||||
{
|
||||
adminReply.setHtml(content);
|
||||
adminReply.replace("%npcId%", String.valueOf(npc.getNpcId()));
|
||||
adminReply.replace("%templateId%", String.valueOf(npc.getIdTemplate()));
|
||||
adminReply.replace("%templateId%", String.valueOf(npc.getDisplayId()));
|
||||
adminReply.replace("%name%", npc.getName());
|
||||
adminReply.replace("%serverSideName%", npc.isServerSideName() ? "1" : "0");
|
||||
adminReply.replace("%title%", npc.getTitle());
|
||||
@ -897,7 +897,7 @@ public class AdminEditNpc implements IAdminCommandHandler
|
||||
{
|
||||
case "templateId":
|
||||
{
|
||||
newNpcData.set("idTemplate", Integer.parseInt(value));
|
||||
newNpcData.set("displayId", Integer.parseInt(value));
|
||||
break;
|
||||
}
|
||||
case "name":
|
||||
|
@ -87,13 +87,11 @@ public class Manadam implements ISkillHandler
|
||||
final SystemMessage sm = new SystemMessage(SystemMessageId.S2_S_MP_HAS_BEEN_DRAINED_BY_S1);
|
||||
if (creature instanceof NpcInstance)
|
||||
{
|
||||
final int mobId = ((NpcInstance) creature).getNpcId();
|
||||
sm.addNpcName(mobId);
|
||||
sm.addString(((NpcInstance) creature).getName());
|
||||
}
|
||||
else if (creature instanceof Summon)
|
||||
{
|
||||
final int mobId = ((Summon) creature).getNpcId();
|
||||
sm.addNpcName(mobId);
|
||||
sm.addString(((Summon) creature).getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -6132,8 +6132,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
final SystemMessage sm = new SystemMessage(SystemMessageId.YOU_HAVE_AVOIDED_S1_S_ATTACK);
|
||||
if (this instanceof Summon)
|
||||
{
|
||||
final int mobId = ((Summon) this).getTemplate().getNpcId();
|
||||
sm.addNpcName(mobId);
|
||||
sm.addString(((Summon) this).getTemplate().getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -179,7 +179,7 @@ public class SummonInstance extends Summon
|
||||
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_SUMMONED_MONSTER_RECEIVED_DAMAGE_OF_S2_CAUSED_BY_S1);
|
||||
if (attacker instanceof NpcInstance)
|
||||
{
|
||||
sm.addNpcName(((NpcInstance) attacker).getTemplate().getNpcId());
|
||||
sm.addString(((NpcInstance) attacker).getTemplate().getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ public class PetStatus extends SummonStatus
|
||||
final SystemMessage sm = new SystemMessage(SystemMessageId.YOUR_PET_RECEIVED_S2_DAMAGE_CAUSED_BY_S1);
|
||||
if (attacker instanceof NpcInstance)
|
||||
{
|
||||
sm.addNpcName(((NpcInstance) attacker).getTemplate().getIdTemplate());
|
||||
sm.addString(((NpcInstance) attacker).getTemplate().getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -128,11 +128,11 @@ public class PlayerStatus extends PlayableStatus
|
||||
final SystemMessage smsg = new SystemMessage(SystemMessageId.S1_HIT_YOU_FOR_S2_DAMAGE);
|
||||
if (attacker instanceof NpcInstance)
|
||||
{
|
||||
smsg.addNpcName(((NpcInstance) attacker).getTemplate().getIdTemplate());
|
||||
smsg.addString(((NpcInstance) attacker).getTemplate().getName());
|
||||
}
|
||||
else if (attacker instanceof Summon)
|
||||
{
|
||||
smsg.addNpcName(((Summon) attacker).getTemplate().getIdTemplate());
|
||||
smsg.addString(((Summon) attacker).getTemplate().getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.skills.Stat;
|
||||
|
||||
/**
|
||||
* This cl contains all generic data of a Spawn object.<br>
|
||||
* This class contains all generic data of a Spawn object.<br>
|
||||
* <br>
|
||||
* <b><u>Data</u>:</b><br>
|
||||
* <li>npcId, type, name, sex</li>
|
||||
@ -56,7 +56,7 @@ public class NpcTemplate extends CreatureTemplate
|
||||
protected static final Logger LOGGER = Logger.getLogger(NpcTemplate.class.getName());
|
||||
|
||||
private final int _npcId;
|
||||
private final int _idTemplate;
|
||||
private final int _displayId;
|
||||
private final String _type;
|
||||
private final String _name;
|
||||
private final boolean _serverSideName;
|
||||
@ -136,7 +136,7 @@ public class NpcTemplate extends CreatureTemplate
|
||||
{
|
||||
super(set);
|
||||
_npcId = set.getInt("npcId");
|
||||
_idTemplate = set.getInt("idTemplate");
|
||||
_displayId = set.getInt("displayId");
|
||||
_type = set.getString("type");
|
||||
_name = set.getString("name");
|
||||
_serverSideName = set.getBoolean("serverSideName");
|
||||
@ -506,9 +506,9 @@ public class NpcTemplate extends CreatureTemplate
|
||||
return _npcId;
|
||||
}
|
||||
|
||||
public int getIdTemplate()
|
||||
public int getDisplayId()
|
||||
{
|
||||
return _idTemplate;
|
||||
return _displayId;
|
||||
}
|
||||
|
||||
public boolean isServerSideName()
|
||||
|
@ -52,7 +52,7 @@ public class MonRaceInfo extends GameServerPacket
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
writeD(_monsters[i].getObjectId()); // npcObjectID
|
||||
writeD(_monsters[i].getTemplate().getIdTemplate() + 1000000); // npcID
|
||||
writeD(_monsters[i].getTemplate().getDisplayId() + 1000000); // npcID
|
||||
writeD(14107); // origin X
|
||||
writeD(181875 + (58 * (7 - i))); // origin Y
|
||||
writeD(-3566); // origin Z
|
||||
|
@ -34,7 +34,7 @@ public class NpcInfo extends GameServerPacket
|
||||
private int _y;
|
||||
private int _z;
|
||||
private int _heading;
|
||||
private int _idTemplate;
|
||||
private int _displayId;
|
||||
private boolean _isAttackable;
|
||||
private boolean _isSummoned;
|
||||
private int _mAtkSpd;
|
||||
@ -71,7 +71,7 @@ public class NpcInfo extends GameServerPacket
|
||||
return;
|
||||
}
|
||||
_creature = cha;
|
||||
_idTemplate = cha.getTemplate().getIdTemplate();
|
||||
_displayId = cha.getTemplate().getDisplayId();
|
||||
_isAttackable = cha.isAutoAttackable(attacker);
|
||||
_rhand = cha.getRightHandItem();
|
||||
_lhand = cha.getLeftHandItem();
|
||||
@ -145,7 +145,7 @@ public class NpcInfo extends GameServerPacket
|
||||
public NpcInfo(Summon cha, Creature attacker)
|
||||
{
|
||||
_creature = cha;
|
||||
_idTemplate = cha.getTemplate().getIdTemplate();
|
||||
_displayId = cha.getTemplate().getDisplayId();
|
||||
_isAttackable = cha.isAutoAttackable(attacker); // (cha.getKarma() > 0);
|
||||
_rhand = 0;
|
||||
_lhand = 0;
|
||||
@ -189,7 +189,7 @@ public class NpcInfo extends GameServerPacket
|
||||
|
||||
writeC(0x16);
|
||||
writeD(_creature.getObjectId());
|
||||
writeD(_idTemplate + 1000000); // npctype id
|
||||
writeD(_displayId + 1000000); // npctype id
|
||||
writeD(_isAttackable ? 1 : 0);
|
||||
writeD(_x);
|
||||
writeD(_y);
|
||||
|
@ -86,7 +86,7 @@ public class PetInfo extends GameServerPacket
|
||||
writeC(0xb1);
|
||||
writeD(_summon.getSummonType());
|
||||
writeD(_summon.getObjectId());
|
||||
writeD(_summon.getTemplate().getIdTemplate() + 1000000);
|
||||
writeD(_summon.getTemplate().getDisplayId() + 1000000);
|
||||
writeD(0); // 1=attackable
|
||||
|
||||
writeD(_x);
|
||||
|
@ -4,7 +4,7 @@
|
||||
DROP TABLE IF EXISTS `custom_npc`;
|
||||
CREATE TABLE `custom_npc`(
|
||||
`id` decimal(11,0) NOT NULL default '0',
|
||||
`idTemplate` int(11) NOT NULL default '0',
|
||||
`displayId` int(11) NOT NULL default '0',
|
||||
`name` varchar(200) default NULL,
|
||||
`serverSideName` int(1) default '0',
|
||||
`title` varchar(45) default '',
|
||||
|
@ -5,7 +5,7 @@ SET FOREIGN_KEY_CHECKS=0;
|
||||
DROP TABLE IF EXISTS `npc`;
|
||||
CREATE TABLE `npc` (
|
||||
`id` decimal(11,0) NOT NULL DEFAULT '0',
|
||||
`idTemplate` int(11) NOT NULL DEFAULT '0',
|
||||
`displayId` int(11) NOT NULL DEFAULT '0',
|
||||
`name` varchar(200) DEFAULT NULL,
|
||||
`serverSideName` int(1) DEFAULT '0',
|
||||
`title` varchar(45) DEFAULT '',
|
||||
|
@ -8,7 +8,7 @@ UPDATE `spawnlist` SET `locx` = '85584', `locy` = '-18224', `locz` = '-1819' WHE
|
||||
UPDATE `clanhall` SET `location` = 'BeastFarm' WHERE `id` = '63';
|
||||
|
||||
-- Insert new NPCs
|
||||
INSERT IGNORE INTO `npc` (`id`,`idTemplate`,`name`,`serverSideName`,`title`,`serverSideTitle`,`class`,`collision_radius`,`collision_height`,`level`,`sex`,`type`,`attackrange`,`hp`,`mp`,`hpreg`,`mpreg`,`str`,`con`,`dex`,`int`,`wit`,`men`,`exp`,`sp`,`patk`,`pdef`,`matk`,`mdef`,`atkspd`,`aggro`,`matkspd`,`rhand`,`lhand`,`armor`,`walkspd`,`runspd`,`faction_id`,`faction_range`,`isUndead`,`absorb_level`,`absorb_type`) VALUES
|
||||
INSERT IGNORE INTO `npc` (`id`,`displayId`,`name`,`serverSideName`,`title`,`serverSideTitle`,`class`,`collision_radius`,`collision_height`,`level`,`sex`,`type`,`attackrange`,`hp`,`mp`,`hpreg`,`mpreg`,`str`,`con`,`dex`,`int`,`wit`,`men`,`exp`,`sp`,`patk`,`pdef`,`matk`,`mdef`,`atkspd`,`aggro`,`matkspd`,`rhand`,`lhand`,`armor`,`walkspd`,`runspd`,`faction_id`,`faction_range`,`isUndead`,`absorb_level`,`absorb_type`) VALUES
|
||||
(75003,31366,'Cole',1,'Beast Manager',1,'NPC.a_traderD_Mhuman',8.00,25.30,70,'male','ClanHallManager',40,3862,3059,11.85,2.78,40,43,30,21,20,10,0,0,1314,470,780,382,278,0,333,0,0,0,55,132,NULL,0,1,0,'LAST_HIT'),
|
||||
(75004,31537,'Tom',1,'Beast Keeper',1,'NPC.a_common_peopleC_Mhuman',10.00,24.00,70,'male','Doorman',40,3862,1493,11.85,2.78,40,43,30,21,20,10,0,0,1314,470,780,382,278,0,333,0,0,0,55,132,NULL,0,1,0,'LAST_HIT'),
|
||||
(75005,31537,'Richard',1,'Beast Keeper',1,'NPC.a_common_peopleC_Mhuman',10.00,24.00,70,'male','Doorman',40,3862,1493,11.85,2.78,40,43,30,21,20,10,0,0,1314,470,780,382,278,0,333,0,0,0,55,132,NULL,0,1,0,'LAST_HIT'),
|
||||
@ -97,7 +97,7 @@ INSERT IGNORE INTO teleport VALUES
|
||||
--
|
||||
|
||||
-- Insert new NPCs
|
||||
INSERT IGNORE INTO `npc` (`id`,`idTemplate`,`name`,`serverSideName`,`title`,`serverSideTitle`,`class`,`collision_radius`,`collision_height`,`level`,`sex`,`type`,`attackrange`,`hp`,`mp`,`hpreg`,`mpreg`,`str`,`con`,`dex`,`int`,`wit`,`men`,`exp`,`sp`,`patk`,`pdef`,`matk`,`mdef`,`atkspd`,`aggro`,`matkspd`,`rhand`,`lhand`,`armor`,`walkspd`,`runspd`,`faction_id`,`faction_range`,`isUndead`,`absorb_level`,`absorb_type`) VALUES
|
||||
INSERT IGNORE INTO `npc` (`id`,`displayId`,`name`,`serverSideName`,`title`,`serverSideTitle`,`class`,`collision_radius`,`collision_height`,`level`,`sex`,`type`,`attackrange`,`hp`,`mp`,`hpreg`,`mpreg`,`str`,`con`,`dex`,`int`,`wit`,`men`,`exp`,`sp`,`patk`,`pdef`,`matk`,`mdef`,`atkspd`,`aggro`,`matkspd`,`rhand`,`lhand`,`armor`,`walkspd`,`runspd`,`faction_id`,`faction_range`,`isUndead`,`absorb_level`,`absorb_type`) VALUES
|
||||
(75007,21591,'Carrie',1,'Undead Matron',1,'Monster2.vampire_wizard',5.50,28.00,73,'female','ClanHallManager',40,4086,3059,13.43,3.09,40,43,30,21,20,10,0,0,1770,415,885,407,278,0,333,99,0,0,50,198,NULL,300,0,0,'LAST_HIT'),
|
||||
(75008,21587,'Freddy',1,'Undead Butler',1,'Monster2.vampire_soldier_20_bi',10.00,29.00,72,'male','Doorman',40,4013,1565,13.43,3.09,40,43,30,21,20,10,0,0,1710,406,849,399,278,0,333,234,0,0,66,209,NULL,300,0,0,'LAST_HIT'),
|
||||
(75009,21587,'Hannibal',1,'Undead Butler',1,'Monster2.vampire_soldier_20_bi',10.00,29.00,72,'male','Doorman',40,4013,1565,13.43,3.09,40,43,30,21,20,10,0,0,1710,406,849,399,278,0,333,234,0,0,66,209,NULL,300,0,0,'LAST_HIT'),
|
||||
|
@ -274,7 +274,7 @@ public class NpcTable
|
||||
final StatSet npcDat = new StatSet();
|
||||
final int id = npcData.getInt("id");
|
||||
npcDat.set("npcId", id);
|
||||
npcDat.set("idTemplate", npcData.getInt("idTemplate"));
|
||||
npcDat.set("displayId", npcData.getInt("displayId"));
|
||||
|
||||
// Level: for special bosses could be different
|
||||
int level = 0;
|
||||
@ -485,12 +485,12 @@ public class NpcTable
|
||||
npcDat.set("baseRunSpd", npcData.getInt("runspd"));
|
||||
|
||||
// constants, until we have stats in DB
|
||||
npcDat.safeSet("baseSTR", npcData.getInt("str"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
|
||||
npcDat.safeSet("baseCON", npcData.getInt("con"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
|
||||
npcDat.safeSet("baseDEX", npcData.getInt("dex"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
|
||||
npcDat.safeSet("baseINT", npcData.getInt("int"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
|
||||
npcDat.safeSet("baseWIT", npcData.getInt("wit"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
|
||||
npcDat.safeSet("baseMEN", npcData.getInt("men"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
|
||||
npcDat.safeSet("baseSTR", npcData.getInt("str"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("displayId"));
|
||||
npcDat.safeSet("baseCON", npcData.getInt("con"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("displayId"));
|
||||
npcDat.safeSet("baseDEX", npcData.getInt("dex"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("displayId"));
|
||||
npcDat.safeSet("baseINT", npcData.getInt("int"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("displayId"));
|
||||
npcDat.safeSet("baseWIT", npcData.getInt("wit"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("displayId"));
|
||||
npcDat.safeSet("baseMEN", npcData.getInt("men"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("displayId"));
|
||||
npcDat.set("baseCpMax", 0);
|
||||
npcDat.set("factionId", npcData.getString("faction_id"));
|
||||
npcDat.set("factionRange", npcData.getInt("faction_range"));
|
||||
|
@ -824,7 +824,7 @@ public class AdminEditNpc implements IAdminCommandHandler
|
||||
{
|
||||
adminReply.setHtml(content);
|
||||
adminReply.replace("%npcId%", String.valueOf(npc.getNpcId()));
|
||||
adminReply.replace("%templateId%", String.valueOf(npc.getIdTemplate()));
|
||||
adminReply.replace("%templateId%", String.valueOf(npc.getDisplayId()));
|
||||
adminReply.replace("%name%", npc.getName());
|
||||
adminReply.replace("%serverSideName%", npc.isServerSideName() ? "1" : "0");
|
||||
adminReply.replace("%title%", npc.getTitle());
|
||||
@ -897,7 +897,7 @@ public class AdminEditNpc implements IAdminCommandHandler
|
||||
{
|
||||
case "templateId":
|
||||
{
|
||||
newNpcData.set("idTemplate", Integer.parseInt(value));
|
||||
newNpcData.set("displayId", Integer.parseInt(value));
|
||||
break;
|
||||
}
|
||||
case "name":
|
||||
|
@ -53,7 +53,7 @@ public class PetStatus extends SummonStatus
|
||||
final SystemMessage sm = new SystemMessage(SystemMessageId.YOUR_PET_RECEIVED_S2_DAMAGE_CAUSED_BY_S1);
|
||||
if (attacker instanceof NpcInstance)
|
||||
{
|
||||
sm.addNpcName(((NpcInstance) attacker).getTemplate().getIdTemplate());
|
||||
sm.addNpcName(((NpcInstance) attacker).getTemplate().getDisplayId());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -154,11 +154,11 @@ public class PlayerStatus extends PlayableStatus
|
||||
final SystemMessage smsg = new SystemMessage(SystemMessageId.S1_HIT_YOU_FOR_S2_DAMAGE);
|
||||
if (attacker instanceof NpcInstance)
|
||||
{
|
||||
smsg.addNpcName(((NpcInstance) attacker).getTemplate().getIdTemplate());
|
||||
smsg.addNpcName(((NpcInstance) attacker).getTemplate().getDisplayId());
|
||||
}
|
||||
else if (attacker instanceof Summon)
|
||||
{
|
||||
smsg.addNpcName(((Summon) attacker).getTemplate().getIdTemplate());
|
||||
smsg.addNpcName(((Summon) attacker).getTemplate().getDisplayId());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.skills.Stat;
|
||||
|
||||
/**
|
||||
* This cl contains all generic data of a Spawn object.<br>
|
||||
* This class contains all generic data of a Spawn object.<br>
|
||||
* <br>
|
||||
* <b><u>Data</u>:</b><br>
|
||||
* <li>npcId, type, name, sex</li>
|
||||
@ -56,7 +56,7 @@ public class NpcTemplate extends CreatureTemplate
|
||||
protected static final Logger LOGGER = Logger.getLogger(NpcTemplate.class.getName());
|
||||
|
||||
private final int _npcId;
|
||||
private final int _idTemplate;
|
||||
private final int _displayId;
|
||||
private final String _type;
|
||||
private final String _name;
|
||||
private final boolean _serverSideName;
|
||||
@ -136,7 +136,7 @@ public class NpcTemplate extends CreatureTemplate
|
||||
{
|
||||
super(set);
|
||||
_npcId = set.getInt("npcId");
|
||||
_idTemplate = set.getInt("idTemplate");
|
||||
_displayId = set.getInt("displayId");
|
||||
_type = set.getString("type");
|
||||
_name = set.getString("name");
|
||||
_serverSideName = set.getBoolean("serverSideName");
|
||||
@ -506,9 +506,9 @@ public class NpcTemplate extends CreatureTemplate
|
||||
return _npcId;
|
||||
}
|
||||
|
||||
public int getIdTemplate()
|
||||
public int getDisplayId()
|
||||
{
|
||||
return _idTemplate;
|
||||
return _displayId;
|
||||
}
|
||||
|
||||
public boolean isServerSideName()
|
||||
|
@ -52,7 +52,7 @@ public class MonRaceInfo extends GameServerPacket
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
writeD(_monsters[i].getObjectId()); // npcObjectID
|
||||
writeD(_monsters[i].getTemplate().getIdTemplate() + 1000000); // npcID
|
||||
writeD(_monsters[i].getTemplate().getDisplayId() + 1000000); // npcID
|
||||
writeD(14107); // origin X
|
||||
writeD(181875 + (58 * (7 - i))); // origin Y
|
||||
writeD(-3566); // origin Z
|
||||
|
@ -34,7 +34,7 @@ public class NpcInfo extends GameServerPacket
|
||||
private int _y;
|
||||
private int _z;
|
||||
private int _heading;
|
||||
private int _idTemplate;
|
||||
private int _displayId;
|
||||
private boolean _isAttackable;
|
||||
private boolean _isSummoned;
|
||||
private int _mAtkSpd;
|
||||
@ -71,7 +71,7 @@ public class NpcInfo extends GameServerPacket
|
||||
return;
|
||||
}
|
||||
_creature = cha;
|
||||
_idTemplate = cha.getTemplate().getIdTemplate();
|
||||
_displayId = cha.getTemplate().getDisplayId();
|
||||
_isAttackable = cha.isAutoAttackable(attacker);
|
||||
_rhand = cha.getRightHandItem();
|
||||
_lhand = cha.getLeftHandItem();
|
||||
@ -145,7 +145,7 @@ public class NpcInfo extends GameServerPacket
|
||||
public NpcInfo(Summon cha, Creature attacker)
|
||||
{
|
||||
_creature = cha;
|
||||
_idTemplate = cha.getTemplate().getIdTemplate();
|
||||
_displayId = cha.getTemplate().getDisplayId();
|
||||
_isAttackable = cha.isAutoAttackable(attacker); // (cha.getKarma() > 0);
|
||||
_rhand = 0;
|
||||
_lhand = 0;
|
||||
@ -189,7 +189,7 @@ public class NpcInfo extends GameServerPacket
|
||||
|
||||
writeC(0x16);
|
||||
writeD(_creature.getObjectId());
|
||||
writeD(_idTemplate + 1000000); // npctype id
|
||||
writeD(_displayId + 1000000); // npctype id
|
||||
writeD(_isAttackable ? 1 : 0);
|
||||
writeD(_x);
|
||||
writeD(_y);
|
||||
|
@ -86,7 +86,7 @@ public class PetInfo extends GameServerPacket
|
||||
writeC(0xb1);
|
||||
writeD(_summon.getSummonType());
|
||||
writeD(_summon.getObjectId());
|
||||
writeD(_summon.getTemplate().getIdTemplate() + 1000000);
|
||||
writeD(_summon.getTemplate().getDisplayId() + 1000000);
|
||||
writeD(0); // 1=attackable
|
||||
|
||||
writeD(_x);
|
||||
|
@ -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);
|
||||
@ -265,7 +265,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;
|
||||
@ -283,7 +283,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);
|
||||
@ -364,7 +364,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();
|
||||
}
|
||||
@ -374,7 +374,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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
@ -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();
|
||||
@ -57,7 +57,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);
|
||||
|
Loading…
Reference in New Issue
Block a user