Core/Unit: allow pets and totems to drop mod charges in owner auras.
Needed for Cobra Strikes (re)implementation
This commit is contained in:
1 parent
60b390a3e8
commit
c131f68f63
1 file changed
+15
@@ -10675,6 +10675,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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user