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)
This commit is contained in:
hondacrx
2021-12-17 19:41:25 -05:00
parent fc95164995
commit 3bae896803
+6 -2
View File
@@ -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