From 3bae896803162be313dc251da64f01656a8e193a Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 17 Dec 2021 19:41:25 -0500 Subject: [PATCH] Core/Loot: fix some other cases where a creature should not be able to set focus. Port From (https://github.com/TrinityCore/TrinityCore/commit/3278f87789b8357ce888ab61026c0ca6daa8e6cb) --- Source/Game/Entities/Creature/Creature.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Game/Entities/Creature/Creature.cs b/Source/Game/Entities/Creature/Creature.cs index 2693fdb60..1aa8516b9 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -2892,8 +2892,12 @@ namespace Game.Entities if (_focusSpell != null) return; - // Prevent dead creatures from setting a focus target, so they won't turn - if (!IsAlive()) + // Prevent dead/feigning death creatures from setting a focus target, so they won't turn + if (!IsAlive() || HasUnitFlag2(UnitFlags2.FeignDeath) || HasAuraType(AuraType.FeignDeath)) + return; + + // Don't allow stunned creatures to set a focus target + if (HasUnitFlag(UnitFlags.Stunned)) return; // some spells shouldn't track targets