diff options
| author | Wyrserth <wyrserth@protonmail.com> | 2019-07-05 14:11:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-05 14:11:15 +0200 |
| commit | 12e545f7e2247f91db3fd1e8e2f961982422a147 (patch) | |
| tree | 0d5fe35be9b5e888e0953cf8625fc89962137f74 /src/server/game/Entities/Unit | |
| parent | c44fb37f74347e3b6d399c941716971503af4cf8 (diff) | |
Core/Conditions: allow spellclick conditions to properly work for aura apply/remove (#23527)
Diffstat (limited to 'src/server/game/Entities/Unit')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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(); |
