fix(Core/Spells): Fix SetSpellModTakingSpell assert from re-entrant calls (#24863)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
parent
fca1ee550d
commit
e17df40a57
1 changed files with 4 additions and 4 deletions
|
|
@ -10027,10 +10027,10 @@ bool Player::HasSpellModApplied(SpellModifier* mod, Spell* spell)
|
|||
|
||||
void Player::SetSpellModTakingSpell(Spell* spell, bool apply)
|
||||
{
|
||||
if (apply && m_spellModTakingSpell)
|
||||
ASSERT(m_spellModTakingSpell == nullptr);
|
||||
else if (!apply)
|
||||
ASSERT(m_spellModTakingSpell && m_spellModTakingSpell == spell);
|
||||
if (apply && m_spellModTakingSpell && m_spellModTakingSpell != spell)
|
||||
return;
|
||||
else if (!apply && m_spellModTakingSpell != spell)
|
||||
return;
|
||||
|
||||
m_spellModTakingSpell = apply ? spell : nullptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue