Unused method removed.

This commit is contained in:
2023-08-26 13:53:32 -04:00
parent d171c6bb9a
commit f5c6c002a8
2 changed files with 2 additions and 39 deletions
+1
View File
@@ -408,4 +408,5 @@ public enum NPCManager {
}
return maxSlots;
}
}
+1 -39
View File
@@ -2002,42 +2002,4 @@ public class Mob extends AbstractIntelligenceAgent {
}
}
public void dismiss() {
if (this.isPet()) {
if ((this.agentType.equals(AIAgentType.PET))) { //delete summoned pet
this.despawn();
WorldGrid.RemoveWorldObject(this);
DbManager.removeFromCache(this);
if (this.getObjectType() == GameObjectType.Mob)
if (this.getParentZone() != null)
this.getParentZone().zoneMobSet.remove(this);
} else { //revert charmed pet
this.agentType = AIAgentType.MOBILE;
this.setCombatTarget(null);
}
//clear owner
PlayerCharacter owner = this.getOwner();
//close pet window
if (owner != null) {
Mob pet = owner.getPet();
PetMsg pm = new PetMsg(5, null);
Dispatch dispatch = Dispatch.borrow(owner, pm);
DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY);
if (pet != null && pet.getObjectUUID() == this.getObjectUUID())
owner.setPet(null);
if (this.getObjectType().equals(GameObjectType.Mob))
this.setOwner(null);
}
}
}
}
}