From b47848d63d1d25e6fea80e504c81b55f4e2eed02 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 1 Aug 2023 20:32:02 -0500 Subject: [PATCH] mob drop combat targets no longer in game --- src/engine/mobileAI/MobAI.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 4fc1024e..0b788f1e 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -429,9 +429,9 @@ public class MobAI { mob.setCombatTarget(null); return; } - if(mob.getCombatTarget().getObjectTypeMask() == MBServerStatics.MASK_PLAYER){ - if(mob.playerAgroMap.containsKey(mob.getCombatTarget().getObjectUUID()) == false){ + PlayerCharacter target = (PlayerCharacter)mob.combatTarget; + if(mob.playerAgroMap.containsKey(target.getObjectUUID()) == false){ mob.setCombatTarget(null); return; } @@ -439,6 +439,10 @@ public class MobAI { mob.setCombatTarget(null); return; } + if(target.getClientConnection() == null){ + mob.setCombatTarget(null); + return; + } } } //if(mob.getTimestamps().containsKey("LOCATIONSYNC") == false){