diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2016-10-28 01:17:06 -0300 |
|---|---|---|
| committer | ariel- <ariel-@users.noreply.github.com> | 2016-10-28 01:17:59 -0300 |
| commit | 51e498342275455f1ca8820fe90ba620b8ff0364 (patch) | |
| tree | 1e7655107050f7db4657de9ca6ba8f986c753a12 /src | |
| parent | e6f386b7d068f267e2697ebde907450268a0d3a0 (diff) | |
Core/Unit: allow pets and totems to drop mod charges in owner auras.
Needed for Cobra Strikes (re)implementation
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index d8a17d70723..3e556cc3aba 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -10947,6 +10947,21 @@ void Unit::TriggerAurasProcOnEvent(Unit* actionTarget, uint32 typeMaskActor, uin { AuraApplicationProcContainer myAurasTriggeringProc; GetProcAurasTriggeredOnEvent(myAurasTriggeringProc, nullptr, myProcEventInfo); + + // needed for example for Cobra Strikes, pet does the attack, but aura is on owner + if (Player* modOwner = GetSpellModOwner()) + { + if (modOwner != this && spell) + { + AuraApplicationList modAuras; + for (auto itr = modOwner->GetAppliedAuras().begin(); itr != modOwner->GetAppliedAuras().end(); ++itr) + { + if (spell->m_appliedMods.count(itr->second->GetBase()) != 0) + modAuras.push_back(itr->second); + } + modOwner->GetProcAurasTriggeredOnEvent(myAurasTriggeringProc, &modAuras, myProcEventInfo); + } + } TriggerAurasProcOnEvent(myProcEventInfo, myAurasTriggeringProc); } |
