From 0d4e8f3c9afe19c925fe6ed4e12fdef77a4210bb Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 29 Feb 2024 19:04:06 -0600 Subject: [PATCH] pet buff trouble shooting --- src/engine/objects/AbstractIntelligenceAgent.java | 2 ++ src/engine/powers/poweractions/CreateMobPowerAction.java | 1 + 2 files changed, 3 insertions(+) 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);