fix(Core/Spells): remove custom loop so that one lightning damage instance can only proc one lightning overload (#21625)

This commit is contained in:
Tereneckla
2025-03-01 13:42:09 +00:00
committed by GitHub
parent 6930d2beda
commit de6732da34

View File

@@ -8412,37 +8412,17 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
if (!procSpell || !IsPlayer() || !victim) if (!procSpell || !IsPlayer() || !victim)
return false; return false;
uint32 spell = procSpell->SpellFamilyFlags[0] & 0x2 ? 45297 : 45284;
if (procEx & PROC_EX_CRITICAL_HIT) if (procEx & PROC_EX_CRITICAL_HIT)
damage /= 2; damage /= 2;
// do not proc off from itself // do not reduce damage-spells have correct basepoints
if (procSpell->Id == 45297 || procSpell->Id == 45284) damage /= 2;
{ int32 dmg = damage;
return false;
}
do // Cast
{ CastCustomSpell(victim, spell, &dmg, 0, 0, true, castItem, triggeredByAura);
uint32 spell = 0;
if (procSpell->SpellFamilyFlags[0] & 0x2)
{
// 1/3 of 33% if 11%
if (!roll_chance_i(33))
return false;
spell = 45297;
}
else
spell = 45284;
// do not reduce damage-spells have correct basepoints
damage /= 2;
int32 dmg = damage;
// Cast
CastCustomSpell(victim, spell, &dmg, 0, 0, true, castItem, triggeredByAura);
} while (roll_chance_i(33));
return true; return true;
} }
// Static Shock // Static Shock