mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-19 06:29:50 -04:00
Core/Conditions: allow spellclick conditions to properly work for aura apply/remove (#23527)
(cherry picked from commit 12e545f7e2)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user