fix(Core/Spells): Restore asserts in SetSpellModTakingSpell (#24862)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
parent
90d7228222
commit
1e73383b54
1 changed files with 2 additions and 15 deletions
|
|
@ -10028,22 +10028,9 @@ bool Player::HasSpellModApplied(SpellModifier* mod, Spell* spell)
|
|||
void Player::SetSpellModTakingSpell(Spell* spell, bool apply)
|
||||
{
|
||||
if (apply && m_spellModTakingSpell)
|
||||
{
|
||||
LOG_INFO("misc", "Player::SetSpellModTakingSpell (A1) - {}, {}", spell->m_spellInfo->Id, m_spellModTakingSpell->m_spellInfo->Id);
|
||||
return;
|
||||
//ASSERT(m_spellModTakingSpell == nullptr);
|
||||
}
|
||||
ASSERT(m_spellModTakingSpell == nullptr);
|
||||
else if (!apply)
|
||||
{
|
||||
if (!m_spellModTakingSpell)
|
||||
LOG_INFO("misc", "Player::SetSpellModTakingSpell (B1) - {}", spell->m_spellInfo->Id);
|
||||
else if (m_spellModTakingSpell != spell)
|
||||
{
|
||||
LOG_INFO("misc", "Player::SetSpellModTakingSpell (C1) - {}, {}", spell->m_spellInfo->Id, m_spellModTakingSpell->m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
//ASSERT(m_spellModTakingSpell && m_spellModTakingSpell == spell);
|
||||
}
|
||||
ASSERT(m_spellModTakingSpell && m_spellModTakingSpell == spell);
|
||||
|
||||
m_spellModTakingSpell = apply ? spell : nullptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue