aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-10-28 01:17:06 -0300
committerjoschiwald <joschiwald.trinity@gmail.com>2017-11-05 12:49:05 +0100
commit4c5815600fb7d606edcf9c1118ca6a98357b009f (patch)
tree102ad060738418fed3ed2a8366fb31fd32106c00 /src
parent0afa672077f1aa59323bedd1871243ef6f6310bf (diff)
Core/Unit: allow pets and totems to drop mod charges in owner auras.
Needed for Cobra Strikes (re)implementation (cherry picked from commit 51e498342275455f1ca8820fe90ba620b8ff0364)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 72506c8b821..9150ac7288b 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -10193,8 +10193,25 @@ void Unit::TriggerAurasProcOnEvent(AuraApplicationList* myProcAuras, AuraApplica
ProcEventInfo myProcEventInfo(this, actionTarget, actionTarget, typeMaskActor, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo);
AuraApplicationProcContainer myAurasTriggeringProc;
if (typeMaskActor && CanProc())
+ {
GetProcAurasTriggeredOnEvent(myAurasTriggeringProc, myProcAuras, 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);
+ }
+ }
+ }
+
// prepare data for target trigger
ProcEventInfo targetProcEventInfo(this, actionTarget, this, typeMaskActionTarget, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo);
AuraApplicationProcContainer targetAurasTriggeringProc;