From fa7588826aa5f0e70498fda1391daf14d7682fbf Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 7 Sep 2023 11:15:30 -0400 Subject: [PATCH] Pets set to not alive when dismissing. --- src/engine/objects/AbstractIntelligenceAgent.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/AbstractIntelligenceAgent.java b/src/engine/objects/AbstractIntelligenceAgent.java index 244b79ee..193ee31d 100644 --- a/src/engine/objects/AbstractIntelligenceAgent.java +++ b/src/engine/objects/AbstractIntelligenceAgent.java @@ -163,7 +163,9 @@ public abstract class AbstractIntelligenceAgent extends AbstractCharacter { this.setCombatTarget(null); } - //clear owner + // clear owner and set not alive + + this.isAlive.set(false); PlayerCharacter owner = (PlayerCharacter) this.guardCaptain; @@ -181,7 +183,7 @@ public abstract class AbstractIntelligenceAgent extends AbstractCharacter { owner.setPet(null); if (this.getObjectType().equals(GameObjectType.Mob)) - ((Mob) this).guardCaptain = null; + this.guardCaptain = null; }