mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-27 22:16:11 +00:00
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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user