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
+10 -6
View File
@@ -180,8 +180,9 @@ public class RemoveObjectCmd extends AbstractDevCmd {
WorldGrid.RemoveWorldObject(minionMob);
WorldGrid.removeObject(minionMob, pc);
if (minionMob.getParentZone() != null)
if (minionMob.getParentZone() != null) {
minionMob.getParentZone().zoneMobSet.remove(minionMob);
}
}
DbManager.NPCQueries.DELETE_NPC(npc);
@@ -202,9 +203,11 @@ public class RemoveObjectCmd extends AbstractDevCmd {
return;
}
if (mob.getParentZone() != null && mob.getParentZone() != currentZone && !mob.isPet() && !mob.isNecroPet()) {
this.throwbackError(pc, "Error 376954: Could not Remove Mob.Mob is not in the same zone as player.");
return;
if (mob.getParentZone() != null) {
if (mob.parentZone != currentZone && !mob.isPet() && !mob.isNecroPet()) {
this.throwbackError(pc, "Error 376954: Could not Remove Mob.Mob is not in the same zone as player.");
return;
}
}
// Remove npc from hirelings list.
@@ -222,8 +225,9 @@ public class RemoveObjectCmd extends AbstractDevCmd {
WorldGrid.RemoveWorldObject(mob);
WorldGrid.removeObject(mob, pc);
if (mob.getParentZone() != null)
mob.getParentZone().zoneMobSet.remove(mob);
if (mob.parentZone != null) {
mob.parentZone.zoneMobSet.remove(mob);
}
ChatManager.chatSayInfo(pc,
"Mob with ID " + mob.getDBID() + " removed");