fix(Core/Spells): Restore asserts in SetSpellModTakingSpell (#24862)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
@@ -10028,22 +10028,9 @@ bool Player::HasSpellModApplied(SpellModifier* mod, Spell* spell)
|
|||||||
void Player::SetSpellModTakingSpell(Spell* spell, bool apply)
|
void Player::SetSpellModTakingSpell(Spell* spell, bool apply)
|
||||||
{
|
{
|
||||||
if (apply && m_spellModTakingSpell)
|
if (apply && m_spellModTakingSpell)
|
||||||
{
|
ASSERT(m_spellModTakingSpell == nullptr);
|
||||||
LOG_INFO("misc", "Player::SetSpellModTakingSpell (A1) - {}, {}", spell->m_spellInfo->Id, m_spellModTakingSpell->m_spellInfo->Id);
|
|
||||||
return;
|
|
||||||
//ASSERT(m_spellModTakingSpell == nullptr);
|
|
||||||
}
|
|
||||||
else if (!apply)
|
else if (!apply)
|
||||||
{
|
ASSERT(m_spellModTakingSpell && m_spellModTakingSpell == spell);
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_spellModTakingSpell = apply ? spell : nullptr;
|
m_spellModTakingSpell = apply ? spell : nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user