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;
|
||||
|
||||
@@ -1313,10 +1313,10 @@ bool SpellInfo::IsAffectedBySpellMod(SpellModifier const* mod) const
|
||||
if (affectSpell->SpellFamilyName != SpellFamilyName)
|
||||
return false;
|
||||
|
||||
if (mod->mask & SpellFamilyFlags)
|
||||
return true;
|
||||
if (mod->mask && !(mod->mask & SpellFamilyFlags))
|
||||
return false;
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SpellInfo::CanPierceImmuneAura(SpellInfo const* aura) const
|
||||
|
||||
@@ -652,13 +652,6 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
spellInfo->AttributesEx3 |= SPELL_ATTR3_ALWAYS_HIT;
|
||||
});
|
||||
|
||||
// Cobra Strikes
|
||||
ApplySpellFix({ 53257 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->ProcCharges = 2;
|
||||
spellInfo->StackAmount = 0;
|
||||
});
|
||||
|
||||
// Kill Command
|
||||
// Kill Command, Overpower
|
||||
ApplySpellFix({ 34027, 37529 }, [](SpellInfo* spellInfo)
|
||||
|
||||
Reference in New Issue
Block a user