|
|
|
@ -336,6 +336,26 @@ public enum BuildingManager {
@@ -336,6 +336,26 @@ public enum BuildingManager {
|
|
|
|
|
|
|
|
|
|
building.getHirelings().remove(hireling); |
|
|
|
|
|
|
|
|
|
// Remove from zone mob set
|
|
|
|
|
|
|
|
|
|
if (hireling.getObjectType().equals(GameObjectType.Mob)) { |
|
|
|
|
|
|
|
|
|
Mob hirelingMob = (Mob) hireling; |
|
|
|
|
|
|
|
|
|
if (hirelingMob.getParentZone() != null) |
|
|
|
|
hirelingMob.getParentZone().zoneMobSet.remove(hireling); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (hireling.getObjectType().equals(GameObjectType.NPC)) { |
|
|
|
|
|
|
|
|
|
NPC hirelingNPC = (NPC) hireling; |
|
|
|
|
|
|
|
|
|
if (hirelingNPC.getParentZone() != null) |
|
|
|
|
hirelingNPC.getParentZone().zoneNPCSet.remove(hireling); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Unload hireling from world
|
|
|
|
|
|
|
|
|
|
DbManager.removeFromCache(hireling); |
|
|
|
|