Workorders cleared with hireling removal.

This commit is contained in:
2024-05-11 07:51:56 -04:00
parent 52e0b5be4d
commit 408e3a45ca
10 changed files with 61 additions and 48 deletions
@@ -154,9 +154,11 @@ public abstract class AbstractIntelligenceAgent extends AbstractCharacter {
WorldGrid.RemoveWorldObject(this);
if (this.getObjectType() == GameObjectType.Mob)
if (((Mob) this).getParentZone() != null)
if (this.getObjectType() == GameObjectType.Mob) {
if (((Mob) this).getParentZone() != null) {
((Mob) this).getParentZone().zoneMobSet.remove(this);
}
}
} else { //revert charmed pet
this.agentType = mbEnums.AIAgentType.MOBILE;
+3 -2
View File
@@ -651,8 +651,9 @@ public class NPC extends AbstractCharacter {
Logger.error(e.getMessage());
}
if (minionMob.getParentZone() != null)
minionMob.getParentZone().zoneMobSet.remove(minionMob);
if (minionMob.parentZone != null) {
minionMob.parentZone.zoneMobSet.remove(minionMob);
}
WorldGrid.RemoveWorldObject(minionMob);
DbManager.removeFromCache(minionMob);
+3 -3
View File
@@ -4172,9 +4172,9 @@ public class PlayerCharacter extends AbstractCharacter {
currentPet.setCombatTarget(null);
if (currentPet.getParentZone() != null)
currentPet.getParentZone().zoneMobSet.remove(currentPet);
if (currentPet.parentZone != null) {
currentPet.parentZone.zoneMobSet.remove(currentPet);
}
try {
currentPet.clearEffects();