fix(Core/Spells): Forward core changes (#8841)

This commit is contained in:
acidmanifesto
2021-12-09 22:24:16 +01:00
committed by GitHub
parent 0300cef119
commit 85d2c39a48
14 changed files with 233 additions and 140 deletions

View File

@@ -4072,6 +4072,14 @@ void Unit::_ApplyAura(AuraApplication* aurApp, uint8 effMask)
if (effMask & 1 << i && (!aurApp->GetRemoveMode()))
aurApp->_HandleEffect(i, true);
}
if (Player* player = ToPlayer())
{
if (sConditionMgr->IsSpellUsedInSpellClickConditions(aurApp->GetBase()->GetId()))
{
player->UpdateVisibleGameobjectsOrSpellClicks();
}
}
}
// removes aura application from lists and unapplies effects
@@ -4150,6 +4158,14 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator& i, AuraRemoveMode removeMo
aura->HandleAuraSpecificMods(aurApp, caster, false, false);
if (Player* player = ToPlayer())
{
if (sConditionMgr->IsSpellUsedInSpellClickConditions(aurApp->GetBase()->GetId()))
{
player->UpdateVisibleGameobjectsOrSpellClicks();
}
}
// only way correctly remove all auras from list
//if (removedAuras != m_removedAurasCount) new aura may be added
i = m_appliedAuras.begin();