Core/Conditions: allow spellclick conditions to properly work for aura apply/remove (#23527)

(cherry picked from commit 12e545f7e2)
This commit is contained in:
Wyrserth
2019-07-05 14:11:15 +02:00
committed by Shauren
parent 104ec7a81a
commit edf12fd6a1
7 changed files with 40 additions and 27 deletions
+8
View File
@@ -3223,6 +3223,10 @@ void Unit::_ApplyAura(AuraApplication* aurApp, uint32 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
@@ -3309,6 +3313,10 @@ 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();