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

# Conflicts:
#	src/server/game/Entities/Player/Player.cpp
This commit is contained in:
Wyrserth authored and Ovahlord committed 2019-07-06 15:25:38 +02:00
1 parent 75ae86d062
commit 3cd1fa44ef
6 files changed
+34 -25

No files matched your search

+8
View File
@@ -3517,6 +3517,10 @@ 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
@@ -3593,6 +3597,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();