diff --git a/src/engine/devcmd/cmds/PurgeObjectsCmd.java b/src/engine/devcmd/cmds/PurgeObjectsCmd.java index 7a022384..c0b318c7 100644 --- a/src/engine/devcmd/cmds/PurgeObjectsCmd.java +++ b/src/engine/devcmd/cmds/PurgeObjectsCmd.java @@ -59,7 +59,7 @@ public class PurgeObjectsCmd extends AbstractDevCmd { if (npc != null) { - for (Mob mob : npc.getSiegeMinionMap().keySet()) { + for (Mob mob : npc.siegeMinionMap.keySet()) { WorldGrid.RemoveWorldObject(mob); WorldGrid.removeObject(mob, pc); //Mob.getRespawnMap().remove(mob); @@ -151,7 +151,7 @@ public class PurgeObjectsCmd extends AbstractDevCmd { if (npc != null) { - for (Mob mob : npc.getSiegeMinionMap().keySet()) { + for (Mob mob : npc.siegeMinionMap.keySet()) { WorldGrid.RemoveWorldObject(mob); WorldGrid.removeObject(mob, pc); //Mob.getRespawnMap().remove(mob); diff --git a/src/engine/devcmd/cmds/RemoveObjectCmd.java b/src/engine/devcmd/cmds/RemoveObjectCmd.java index 6d13d2b1..c1ee4f85 100644 --- a/src/engine/devcmd/cmds/RemoveObjectCmd.java +++ b/src/engine/devcmd/cmds/RemoveObjectCmd.java @@ -154,7 +154,7 @@ public class RemoveObjectCmd extends AbstractDevCmd { mobA = (Mob) ac; if (npc != null) { - for (Mob mob : npc.getSiegeMinionMap().keySet()) { + for (Mob mob : npc.siegeMinionMap.keySet()) { WorldGrid.RemoveWorldObject(mob); WorldGrid.removeObject(mob, pc); //Mob.getRespawnMap().remove(mob); @@ -209,7 +209,7 @@ public class RemoveObjectCmd extends AbstractDevCmd { if (npc.building != null) npc.building.getHirelings().remove(npc); - for (Mob mob : npc.getSiegeMinionMap().keySet()) { + for (Mob mob : npc.siegeMinionMap.keySet()) { WorldGrid.RemoveWorldObject(mob); WorldGrid.removeObject(mob, pc); if (mob.getParentZone() != null) diff --git a/src/engine/net/client/handlers/MinionTrainingMsgHandler.java b/src/engine/net/client/handlers/MinionTrainingMsgHandler.java index ba383580..f9007eb9 100644 --- a/src/engine/net/client/handlers/MinionTrainingMsgHandler.java +++ b/src/engine/net/client/handlers/MinionTrainingMsgHandler.java @@ -41,7 +41,6 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler { if (player == null) return true; - if (minionMsg.getNpcType() == Enum.GameObjectType.NPC.ordinal()) { NPC npc = NPC.getFromCache(minionMsg.getNpcID()); @@ -62,10 +61,10 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler { Mob toRemove = Mob.getFromCache(minionMsg.getUUID()); - if (!npc.getSiegeMinionMap().containsKey(toRemove)) + if (!npc.siegeMinionMap.containsKey(toRemove)) return true; - npc.getSiegeMinionMap().remove(toRemove); + npc.siegeMinionMap.remove(toRemove); WorldGrid.RemoveWorldObject(toRemove); @@ -118,7 +117,7 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler { if (npc.getContractID() == 842) maxSlots = 1; - if (npc.getSiegeMinionMap().size() == maxSlots) + if (npc.siegeMinionMap.size() == maxSlots) return true; int mobBase; diff --git a/src/engine/net/client/msg/ManageNPCMsg.java b/src/engine/net/client/msg/ManageNPCMsg.java index c6c07279..d68ecb04 100644 --- a/src/engine/net/client/msg/ManageNPCMsg.java +++ b/src/engine/net/client/msg/ManageNPCMsg.java @@ -343,7 +343,7 @@ public class ManageNPCMsg extends ClientNetMsg { writer.putInt(0); //runemaster list //artillery captain list - ConcurrentHashMap siegeMinions = npc.getSiegeMinionMap(); + ConcurrentHashMap siegeMinions = npc.siegeMinionMap; writer.putInt(1 + siegeMinions.size()); serializeBulwarkList(writer, 1); //Trebuchet //serializeBulwarkList(writer, 2); //Ballista diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 0f96e6cc..1d275bd1 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -528,8 +528,8 @@ public class Mob extends AbstractIntelligenceAgent { siegeMinion.setLoc(siegeMinion.bindLoc); siegeMinion.despawn(); - int slot = artyCaptain.getSiegeMinionMap().size() + 1; - artyCaptain.getSiegeMinionMap().put(siegeMinion, slot); + int slot = artyCaptain.siegeMinionMap.size() + 1; + artyCaptain.siegeMinionMap.put(siegeMinion, slot); return siegeMinion; } diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index f318f87e..07775e33 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -1103,10 +1103,6 @@ public class NPC extends AbstractCharacter { return (int) time; } - public ConcurrentHashMap getSiegeMinionMap() { - return siegeMinionMap; - } - public boolean remove() { Building building;