diff --git a/src/engine/objects/AbstractIntelligenceAgent.java b/src/engine/objects/AbstractIntelligenceAgent.java index f18d4acb..3c8ce22c 100644 --- a/src/engine/objects/AbstractIntelligenceAgent.java +++ b/src/engine/objects/AbstractIntelligenceAgent.java @@ -15,6 +15,7 @@ import engine.Enum.GameObjectType; import engine.Enum.ModType; import engine.Enum.SourceType; import engine.InterestManagement.WorldGrid; +import engine.gameManager.DbManager; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; import engine.mobileAI.Threads.MobAIThread; @@ -153,6 +154,7 @@ public abstract class AbstractIntelligenceAgent extends AbstractCharacter { if ((this.agentType.equals(Enum.AIAgentType.PET))) { //delete summoned pet WorldGrid.RemoveWorldObject(this); + DbManager.removeFromCache(this); if (this.getObjectType() == GameObjectType.Mob) if (((Mob) this).getParentZone() != null) diff --git a/src/engine/powers/poweractions/CreateMobPowerAction.java b/src/engine/powers/poweractions/CreateMobPowerAction.java index 41c7e810..a4cd2b11 100644 --- a/src/engine/powers/poweractions/CreateMobPowerAction.java +++ b/src/engine/powers/poweractions/CreateMobPowerAction.java @@ -134,6 +134,7 @@ public class CreateMobPowerAction extends AbstractPowerAction { NPCManager.resetNecroPets(owner); } } + DbManager.addToCache(pet); owner.setPet(pet);