fix(Core/Spells): Fix Cobra Strikes stack consumption (#24906)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com> Co-authored-by: TrinityCore <TrinityCore@users.noreply.github.com>
This commit is contained in:
parent
74dd60a7b1
commit
396c35be2f
5 changed files with 72 additions and 11 deletions
|
|
@ -13040,6 +13040,23 @@ void Unit::TriggerAurasProcOnEvent(std::list<AuraApplication*>* myProcAuras, std
|
|||
AuraApplicationProcContainer myAurasTriggeringProc;
|
||||
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)
|
||||
{
|
||||
std::list<AuraApplication*> 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);
|
||||
}
|
||||
|
||||
if (!modAuras.empty())
|
||||
modOwner->GetProcAurasTriggeredOnEvent(myAurasTriggeringProc, &modAuras, myProcEventInfo);
|
||||
}
|
||||
}
|
||||
|
||||
// prepare data for target trigger
|
||||
ProcEventInfo targetProcEventInfo = ProcEventInfo(this, actionTarget, this, typeMaskActionTarget, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo);
|
||||
AuraApplicationProcContainer targetAurasTriggeringProc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue