fix(Core/Unit): spell_group leftovers (#23995)

Co-authored-by: ariel- <ariel-@users.noreply.github.com>
This commit is contained in:
Tereneckla
2025-12-01 00:52:47 +00:00
committed by GitHub
parent 9d74401b67
commit a8c05b236c
6 changed files with 33 additions and 18 deletions

View File

@@ -443,15 +443,16 @@ class spell_dru_enrage : public AuraScript
void RecalculateBaseArmor()
{
// Recalculate modifies the list while we're iterating through it, so let's copy it instead
Unit::AuraEffectList const& auras = GetTarget()->GetAuraEffectsByType(SPELL_AURA_MOD_BASE_RESISTANCE_PCT);
for (Unit::AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
std::vector<AuraEffect*> aurEffs(auras.begin(), auras.end());
for (AuraEffect* aurEff : aurEffs)
{
SpellInfo const* spellInfo = (*i)->GetSpellInfo();
SpellInfo const* spellInfo = aurEff->GetSpellInfo();
// Dire- / Bear Form (Passive)
if (spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && spellInfo->SpellFamilyFlags.HasFlag(0x0, 0x0, 0x2))
{
(*i)->RecalculateAmount();
}
aurEff->RecalculateAmount();
}
}