From 12e545f7e2247f91db3fd1e8e2f961982422a147 Mon Sep 17 00:00:00 2001 From: Wyrserth Date: Fri, 5 Jul 2019 14:11:15 +0200 Subject: Core/Conditions: allow spellclick conditions to properly work for aura apply/remove (#23527) --- src/server/game/Entities/Unit/Unit.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/server/game/Entities/Unit') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 937048030fd..60f30c0a428 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3342,6 +3342,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 @@ -3428,6 +3432,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(); -- cgit v1.2.3