Fixed setting and unsetting of m_spellModTakingSpell
Port From (https://github.com/TrinityCore/TrinityCore/commit/fb5c07ffe8d72d32a2c47cfa41dfb3a952160b72)
This commit is contained in:
@@ -2969,10 +2969,10 @@ namespace Game.Entities
|
||||
|
||||
public void SetSpellModTakingSpell(Spell spell, bool apply)
|
||||
{
|
||||
if (spell == null || (m_spellModTakingSpell != null && m_spellModTakingSpell != spell))
|
||||
if (apply && m_spellModTakingSpell != null)
|
||||
return;
|
||||
|
||||
if (apply && spell.getState() == SpellState.Finished)
|
||||
if (!apply && (m_spellModTakingSpell == null || m_spellModTakingSpell != spell))
|
||||
return;
|
||||
|
||||
m_spellModTakingSpell = apply ? spell : null;
|
||||
|
||||
Reference in New Issue
Block a user