mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
fix(Core/Spells): remove custom loop so that one lightning damage instance can only proc one lightning overload (#21625)
This commit is contained in:
@@ -8412,37 +8412,17 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
if (!procSpell || !IsPlayer() || !victim)
|
||||
return false;
|
||||
|
||||
uint32 spell = procSpell->SpellFamilyFlags[0] & 0x2 ? 45297 : 45284;
|
||||
|
||||
if (procEx & PROC_EX_CRITICAL_HIT)
|
||||
damage /= 2;
|
||||
|
||||
// do not proc off from itself
|
||||
if (procSpell->Id == 45297 || procSpell->Id == 45284)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// do not reduce damage-spells have correct basepoints
|
||||
damage /= 2;
|
||||
int32 dmg = damage;
|
||||
|
||||
do
|
||||
{
|
||||
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));
|
||||
// Cast
|
||||
CastCustomSpell(victim, spell, &dmg, 0, 0, true, castItem, triggeredByAura);
|
||||
return true;
|
||||
}
|
||||
// Static Shock
|
||||
|
||||
Reference in New Issue
Block a user