fix(Core/Spells): Restrict percent stat aura target (#26198)

Co-authored-by: QAston <qaston@gmail.com>
This commit is contained in:
Christopher Mckerracher
2026-06-16 16:06:56 -04:00
committed by GitHub
parent 72fbcd35d7
commit 98e7a05caa
@@ -4246,15 +4246,18 @@ void AuraEffect::HandleModPercentStat(AuraApplication const* aurApp, uint8 mode,
for (int32 i = STAT_STRENGTH; i < MAX_STATS; ++i)
{
if (apply)
target->ApplyStatPctModifier(UnitMods(UNIT_MOD_STAT_START + i), BASE_PCT, float(GetAmount()));
else
if (GetMiscValue() == i || GetMiscValue() == -1)
{
float amount = target->GetTotalAuraMultiplier(SPELL_AURA_MOD_PERCENT_STAT, [i](AuraEffect const* aurEff)
if (apply)
target->ApplyStatPctModifier(UnitMods(UNIT_MOD_STAT_START + i), BASE_PCT, float(GetAmount()));
else
{
return (aurEff->GetMiscValue() == i || aurEff->GetMiscValue() == -1);
});
target->SetStatPctModifier(UnitMods(UNIT_MOD_STAT_START + i), BASE_PCT, amount);
float amount = target->GetTotalAuraMultiplier(SPELL_AURA_MOD_PERCENT_STAT, [i](AuraEffect const* aurEff)
{
return (aurEff->GetMiscValue() == i || aurEff->GetMiscValue() == -1);
});
target->SetStatPctModifier(UnitMods(UNIT_MOD_STAT_START + i), BASE_PCT, amount);
}
}
}
}