forked from MagicBane/Server
Workorders cleared with hireling removal.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user