mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 05:43:12 +01:00
Core/Creature: prevent dead creatures from setting a focus target, so they won't turn when hit by certain spells. (#23367)
This commit is contained in:
@@ -2946,6 +2946,10 @@ void Creature::FocusTarget(Spell const* focusSpell, WorldObject const* target)
|
||||
if (m_focusSpell)
|
||||
return;
|
||||
|
||||
// Prevent dead creatures from setting a focus target, so they won't turn
|
||||
if (!IsAlive())
|
||||
return;
|
||||
|
||||
// some spells shouldn't track targets
|
||||
if (focusSpell->IsFocusDisabled())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user