Changeset 5098
- Timestamp:
- Nov 29, 2011 4:06:02 AM (6 months ago)
- Location:
- branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver
- Files:
-
- 9 edited
-
datatables/NpcTable.java (modified) (3 diffs)
-
model/L2NpcAIData.java (modified) (3 diffs)
-
model/actor/L2Npc.java (modified) (3 diffs)
-
model/actor/instance/L2BlockInstance.java (modified) (1 diff)
-
model/actor/instance/L2FlyTerrainObjectInstance.java (modified) (1 diff)
-
model/actor/instance/L2MonsterInstance.java (modified) (1 diff)
-
model/actor/instance/L2TerrainObjectInstance.java (modified) (1 diff)
-
network/serverpackets/AbstractNpcInfo.java (modified) (4 diffs)
-
templates/chars/L2NpcTemplate.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/NpcTable.java
r5095 r5098 106 106 npcDat.set("basePAtkSpd", NpcData.getInt("atkspd")); 107 107 npcDat.set("baseMAtkSpd", NpcData.getInt("matkspd")); 108 npcDat.set("aggroRange", NpcData.getInt("aggro"));109 108 npcDat.set("rhand", NpcData.getInt("rhand")); 110 109 npcDat.set("lhand", NpcData.getInt("lhand")); … … 112 111 npcDat.set("baseWalkSpd", NpcData.getInt("walkspd")); 113 112 npcDat.set("baseRunSpd", NpcData.getInt("runspd")); 114 npcDat.set("targetable", NpcData.getBoolean("targetable"));115 npcDat.set("show_name", NpcData.getBoolean("show_name"));116 113 117 114 // constants, until we have stats in DB … … 885 882 npcAIDat.setDodge(rset.getInt("dodge")); 886 883 npcAIDat.setAi(rset.getString("aiType")); 884 npcAIDat.setAggro(rset.getInt("aggro")); 885 npcAIDat.setShowName(rset.getBoolean("showName")); 886 npcAIDat.setTargetable(rset.getBoolean("targetable")); 887 887 888 888 npcDat.setAIData(npcAIDat); -
branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/model/L2NpcAIData.java
r4993 r5098 48 48 private int _switchRangeChance; 49 49 private AIType _aiType = AIType.FIGHTER; 50 private int _aggroRange; 51 private boolean _showName; 52 private boolean _targetable; 50 53 51 54 public void setPrimarySkillId(int primarySkillId) … … 178 181 } 179 182 183 public void setAggro(int val) 184 { 185 _aggroRange = val; 186 } 187 188 public void setTargetable(boolean val) 189 { 190 _targetable = val; 191 } 192 193 public void setShowName(boolean val) 194 { 195 _showName = val; 196 } 197 180 198 public int getPrimarySkillId() 181 199 { … … 277 295 return _aiType; 278 296 } 297 298 public int getAggroRange() 299 { 300 return _aggroRange; 301 } 302 303 /** 304 * @return {@code true} if the NPC name should shows above NPC, {@code false} otherwise. 305 */ 306 public boolean showName() 307 { 308 return _showName; 309 } 310 311 /** 312 * @return {@code true} if the NPC can be targeted, {@code false} otherwise. 313 */ 314 public boolean isTargetable() 315 { 316 return _targetable; 317 } 279 318 } -
branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/L2Npc.java
r5097 r5098 136 136 public boolean _ssrecharged = true; 137 137 public boolean _spsrecharged = true; 138 protected boolean _isHideName = false;139 138 private int _displayEffect = 0; 140 139 … … 613 612 public int getAggroRange() 614 613 { 615 return getTemplate().getAggroRange();614 return _staticAIData.getAggroRange(); 616 615 } 617 616 … … 1543 1542 } 1544 1543 1545 public void setHideName(boolean val)1546 { 1547 _isHideName = val;1548 } 1549 1550 public boolean is HideName()1551 { 1552 return _ isHideName;1544 public boolean isShowName() 1545 { 1546 return _staticAIData.showName(); 1547 } 1548 1549 public boolean isTargetable() 1550 { 1551 return _staticAIData.isTargetable(); 1553 1552 } 1554 1553 -
branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2BlockInstance.java
r5083 r5098 44 44 { 45 45 super(objectId, template); 46 this.setHideName(true);47 46 } 48 47 -
branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2FlyTerrainObjectInstance.java
r4417 r5098 26 26 super(objectId, template); 27 27 setInstanceType(InstanceType.L2FlyTerrainObjectInstance); 28 _isHideName = true;29 28 } 30 29 -
branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2MonsterInstance.java
r5013 r5098 94 94 public boolean isAggressive() 95 95 { 96 return (get Template().getAggroRange() > 0) && !isEventMob;96 return (getAggroRange() > 0) && !isEventMob; 97 97 } 98 98 -
branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2TerrainObjectInstance.java
r4417 r5098 25 25 super(objectId, template); 26 26 setInstanceType(InstanceType.L2TerrainObjectInstance); 27 _isHideName = true;28 27 } 29 28 -
branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/AbstractNpcInfo.java
r5013 r5098 83 83 public static class NpcInfo extends AbstractNpcInfo 84 84 { 85 private L2Npc _npc;85 private final L2Npc _npc; 86 86 private int _clanCrest = 0; 87 87 private int _allyCrest = 0; … … 193 193 writeD(0x00); 194 194 writeD(_npc.getColorEffect());// CT1.5 Pet form and skills, Color effect 195 writeC(_npc.is HideName() ? 0x00 : 0x01);196 writeC(_npc.is HideName() ? 0x00 : 0x01);195 writeC(_npc.isShowName() ? 0x01 : 0x00); 196 writeC(_npc.isTargetable() ? 0x01 : 0x00); 197 197 writeD(_npc.getSpecialEffect()); 198 198 writeD(_displayEffect); … … 202 202 public static class TrapInfo extends AbstractNpcInfo 203 203 { 204 private L2Trap _trap;204 private final L2Trap _trap; 205 205 206 206 public TrapInfo(L2Trap cha, L2Character attacker) … … 291 291 public static class SummonInfo extends AbstractNpcInfo 292 292 { 293 private L2Summon _summon;293 private final L2Summon _summon; 294 294 private int _form = 0; 295 295 private int _val = 0; -
branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/templates/chars/L2NpcTemplate.java
r5083 r5098 54 54 private final int _rewardExp; 55 55 private final int _rewardSp; 56 private final int _aggroRange;57 56 private final int _rHand; 58 57 private final int _lHand; … … 216 215 _rewardExp = set.getInteger("rewardExp"); 217 216 _rewardSp = set.getInteger("rewardSp"); 218 _aggroRange = set.getInteger("aggroRange");219 217 _rHand = set.getInteger("rhand"); 220 218 _lHand = set.getInteger("lhand"); … … 574 572 } 575 573 576 /**577 * @return the aggro range value.578 */579 public int getAggroRange()580 {581 return _aggroRange;582 }583 584 574 public L2NpcAIData getAIDataStatic() 585 575 {
Note: See TracChangeset
for help on using the changeset viewer.
