diff options
author | Treeston <treeston.mmoc@gmail.com> | 2019-08-11 13:31:46 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-18 20:29:05 +0100 |
commit | 4b588694caed2ccab36241abb61e2c93ce8b5bb1 (patch) | |
tree | 424bb9ea1a7dccf40d90047198ff5dfb752efc79 /src | |
parent | c5244d4e664e4b7226085bbfc7e0e9e133d72fd3 (diff) |
Core/Creature: Fix an issue that sometimes prevented spellcast focus targets from being reacquired.
(cherry picked from commit fcce90508d899641494d7c281a0e08e411a0d5ab)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index cbe406cfb2f..34889a5cea7 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -3300,10 +3300,9 @@ void Creature::ReleaseSpellFocus(Spell const* focusSpell, bool withDelay) void Creature::ReacquireSpellFocusTarget() { - if (!HasSpellFocus()) - return; + ASSERT(HasSpellFocus()); - SetTarget(_spellFocusInfo.Target); + SetUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::Target), _spellFocusInfo.Target); if (!HasUnitFlag2(UNIT_FLAG2_DISABLE_TURN)) { |