Minions now use copyonwrite collection. Slot agnostic.
This commit is contained in:
@@ -58,10 +58,10 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
Mob toRemove = Mob.getFromCache(minionMsg.getUUID());
|
||||
|
||||
if (!npc.siegeMinionMap.containsKey(toRemove))
|
||||
if (!npc.minions.contains(toRemove.getObjectUUID()))
|
||||
return true;
|
||||
|
||||
npc.siegeMinionMap.remove(toRemove);
|
||||
npc.minions.remove(toRemove.getObjectUUID());
|
||||
|
||||
WorldGrid.RemoveWorldObject(toRemove);
|
||||
|
||||
@@ -112,7 +112,7 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler {
|
||||
if (npc.getContractID() == 842)
|
||||
maxSlots = 1;
|
||||
|
||||
if (npc.siegeMinionMap.size() == maxSlots)
|
||||
if (npc.minions.size() == maxSlots)
|
||||
return true;
|
||||
|
||||
int mobBase;
|
||||
@@ -179,13 +179,13 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
Mob toRemove = Mob.getFromCache(minionMsg.getUUID());
|
||||
|
||||
if (!npc.getSiegeMinionMap().containsKey(toRemove))
|
||||
if (!npc.minions.contains(toRemove.getObjectUUID()))
|
||||
return true;
|
||||
|
||||
if (!DbManager.MobQueries.REMOVE_FROM_GUARDS(npc.getObjectUUID(), toRemove.firstName))
|
||||
return true;
|
||||
|
||||
npc.getSiegeMinionMap().remove(toRemove);
|
||||
npc.minions.remove(toRemove.getObjectUUID());
|
||||
|
||||
WorldGrid.RemoveWorldObject(toRemove);
|
||||
|
||||
@@ -258,7 +258,7 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler {
|
||||
break;
|
||||
}
|
||||
|
||||
if (npc.getSiegeMinionMap().size() == maxSlots)
|
||||
if (npc.minions.size() == maxSlots)
|
||||
return true;
|
||||
|
||||
int mobBase = npc.getMobBaseID();
|
||||
|
||||
Reference in New Issue
Block a user