mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-15 21:45:12 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user