From 4f5bc9af9a11f8ac1894df459075342b7a5b7317 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sun, 5 Nov 2017 15:39:33 -0500 Subject: [PATCH] allow pets and totems to drop mod charges in owner auras. --- Source/Game/Entities/Unit/Unit.Spells.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Source/Game/Entities/Unit/Unit.Spells.cs b/Source/Game/Entities/Unit/Unit.Spells.cs index 085fe29c3..1e127f9f7 100644 --- a/Source/Game/Entities/Unit/Unit.Spells.cs +++ b/Source/Game/Entities/Unit/Unit.Spells.cs @@ -1859,8 +1859,26 @@ namespace Game.Entities ProcEventInfo myProcEventInfo = new ProcEventInfo(this, actionTarget, actionTarget, typeMaskActor, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo); List> myAurasTriggeringProc = new List>(); if (typeMaskActor != 0 && CanProc()) + { GetProcAurasTriggeredOnEvent(myAurasTriggeringProc, myProcAuras, myProcEventInfo); + // needed for example for Cobra Strikes, pet does the attack, but aura is on owner + Player modOwner = GetSpellModOwner(); + if (modOwner) + { + if (modOwner != this && spell) + { + List modAuras = new List(); + foreach (var itr in modOwner.GetAppliedAuras()) + { + if (spell.m_appliedMods.Contains(itr.Value.GetBase())) + modAuras.Add(itr.Value); + } + modOwner.GetProcAurasTriggeredOnEvent(myAurasTriggeringProc, modAuras, myProcEventInfo); + } + } + } + // prepare data for target trigger ProcEventInfo targetProcEventInfo = new ProcEventInfo(this, actionTarget, this, typeMaskActionTarget, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo); List> targetAurasTriggeringProc = new List>();