allow pets and totems to drop mod charges in owner auras.

This commit is contained in:
hondacrx
2017-11-05 15:39:33 -05:00
parent 690198736e
commit 4f5bc9af9a
+18
View File
@@ -1859,8 +1859,26 @@ namespace Game.Entities
ProcEventInfo myProcEventInfo = new ProcEventInfo(this, actionTarget, actionTarget, typeMaskActor, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo); ProcEventInfo myProcEventInfo = new ProcEventInfo(this, actionTarget, actionTarget, typeMaskActor, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo);
List<Tuple<uint, AuraApplication>> myAurasTriggeringProc = new List<Tuple<uint, AuraApplication>>(); List<Tuple<uint, AuraApplication>> myAurasTriggeringProc = new List<Tuple<uint, AuraApplication>>();
if (typeMaskActor != 0 && CanProc()) if (typeMaskActor != 0 && CanProc())
{
GetProcAurasTriggeredOnEvent(myAurasTriggeringProc, myProcAuras, myProcEventInfo); 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<AuraApplication> modAuras = new List<AuraApplication>();
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 // prepare data for target trigger
ProcEventInfo targetProcEventInfo = new ProcEventInfo(this, actionTarget, this, typeMaskActionTarget, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo); ProcEventInfo targetProcEventInfo = new ProcEventInfo(this, actionTarget, this, typeMaskActionTarget, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo);
List<Tuple<uint, AuraApplication>> targetAurasTriggeringProc = new List<Tuple<uint, AuraApplication>>(); List<Tuple<uint, AuraApplication>> targetAurasTriggeringProc = new List<Tuple<uint, AuraApplication>>();