fix(Core/Spells): Restore asserts in SetSpellModTakingSpell (#24862)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-02-24 19:04:14 -06:00
committed by GitHub
parent 90d7228222
commit 1e73383b54

View File

@@ -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;
}