Relevant methods made static and moved into NPCManager

This commit is contained in:
2023-03-31 09:59:49 -04:00
parent bbdbead1ff
commit 3881c2b1d0
20 changed files with 507 additions and 539 deletions
+2 -2
View File
@@ -260,7 +260,7 @@ public enum BuildingManager {
if (slottedNPC.getObjectType() == Enum.GameObjectType.NPC)
((NPC) slottedNPC).remove();
else if (slottedNPC.getObjectType() == Enum.GameObjectType.Mob)
((Mob) slottedNPC).remove(building);
NPCManager.removeMobileFromBuilding(((Mob) slottedNPC), building);
}
return;
}
@@ -285,7 +285,7 @@ public enum BuildingManager {
else
building.getHirelings().remove(npc);
} else if (mob != null) {
if (!mob.remove(building))
if (!NPCManager.removeMobileFromBuilding(mob, building))
Logger.error("Failed to remove npc " + npc.getObjectUUID()
+ "from Building " + building.getObjectUUID());
else