Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: data/scripts/handlers/actionhandlers/L2NpcActionShift.java
- ===================================================================
- --- data/scripts/handlers/actionhandlers/L2NpcActionShift.java (revision 7437)
- +++ data/scripts/handlers/actionhandlers/L2NpcActionShift.java (working copy)
- @@ -106,7 +106,7 @@
- String.valueOf((int)Math.sqrt(target.getDistanceSq(((L2Npc)target).getSpawn().getLocx(), ((L2Npc)target).getSpawn().getLocy(), ((L2Npc)target).getSpawn().getLocz())))
- );
- - if (target.isInstanceType(InstanceType.L2ControllableMobInstance))
- + if (target instanceof L2ControllableMobInstance)
- {
- StringUtil.append(html1,
- "<br1>Mob Group: ",
- @@ -140,7 +140,7 @@
- String.valueOf(((L2Npc)target).getTemplate().npcId),
- "</td></tr>" +
- "<tr><td>Aggro</td><td>" +
- - String.valueOf((target.isInstanceType(InstanceType.L2Attackable)) ? ((L2Attackable) target).getAggroRange() : 0),
- + String.valueOf((target instanceof L2Attackable) ? ((L2Attackable) target).getAggroRange() : 0),
- "</td><td> </td><td>Object ID</td><td>",
- String.valueOf(target.getObjectId()),
- "</td></tr>" +
- Index: data/scripts/handlers/bypasshandlers/TerritoryWar.java
- ===================================================================
- --- data/scripts/handlers/bypasshandlers/TerritoryWar.java (revision 7437)
- +++ data/scripts/handlers/bypasshandlers/TerritoryWar.java (working copy)
- @@ -61,7 +61,7 @@
- int castleId = Integer.parseInt(st.nextToken());
- activeChar.sendPacket(new ExShowDominionRegistry(castleId, activeChar));
- }
- - else if (!target.isInstanceType(InstanceType.L2MercenaryManagerInstance))
- + else if (!(target instanceof L2MercenaryManagerInstance))
- return false;
- L2MercenaryManagerInstance mercman = ((L2MercenaryManagerInstance)target);
- Index: data/scripts/handlers/itemhandlers/Elixir.java
- ===================================================================
- --- data/scripts/handlers/itemhandlers/Elixir.java (revision 7437)
- +++ data/scripts/handlers/itemhandlers/Elixir.java (working copy)
- @@ -17,6 +17,7 @@
- import com.l2jserver.gameserver.model.L2ItemInstance;
- import com.l2jserver.gameserver.model.L2Object.InstanceType;
- import com.l2jserver.gameserver.model.actor.L2Playable;
- +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- import com.l2jserver.gameserver.network.SystemMessageId;
- import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
- @@ -28,7 +29,7 @@
- */
- public void useItem(L2Playable playable, L2ItemInstance item)
- {
- - if (!(playable.isInstanceType(InstanceType.L2PcInstance)))
- + if (!(playable instanceof L2PcInstance))
- {
- playable.sendPacket(new SystemMessage(SystemMessageId.ITEM_NOT_FOR_PETS));
- return;
- Index: data/scripts/handlers/itemhandlers/ItemSkills.java
- ===================================================================
- --- data/scripts/handlers/itemhandlers/ItemSkills.java (revision 7437)
- +++ data/scripts/handlers/itemhandlers/ItemSkills.java (working copy)
- @@ -22,6 +22,7 @@
- import com.l2jserver.gameserver.model.actor.L2Playable;
- import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- import com.l2jserver.gameserver.model.actor.instance.L2PetInstance;
- +import com.l2jserver.gameserver.model.actor.instance.L2SummonInstance;
- import com.l2jserver.gameserver.model.actor.instance.L2PcInstance.TimeStamp;
- import com.l2jserver.gameserver.model.entity.TvTEvent;
- import com.l2jserver.gameserver.network.SystemMessageId;
- @@ -43,10 +44,10 @@
- public void useItem(L2Playable playable, L2ItemInstance item)
- {
- L2PcInstance activeChar;
- - boolean isPet = playable.isInstanceType(InstanceType.L2PetInstance);
- + boolean isPet = playable instanceof L2PetInstance;
- if (isPet)
- activeChar = ((L2PetInstance) playable).getOwner();
- - else if (playable.isInstanceType(InstanceType.L2PcInstance))
- + else if (playable instanceof L2PcInstance)
- activeChar = (L2PcInstance) playable;
- else
- return;
- @@ -160,7 +161,7 @@
- if (!isPet
- && item.getItemType() == L2EtcItemType.HERB
- && activeChar.getPet() != null
- - && activeChar.getPet().isInstanceType(InstanceType.L2SummonInstance))
- + && activeChar.getPet() instanceof L2SummonInstance)
- activeChar.getPet().doSimultaneousCast(itemSkill);
- }
- else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement