aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoret65 <et65@ashbringer.fr>2015-05-16 15:36:13 +0200
committeret65 <et65@ashbringer.fr>2015-05-16 15:36:13 +0200
commit50b50563cec2a03c285f7f24f524b8b2c653860f (patch)
tree3a3874648bc36a5d04733bb911d176b108871f70
parentb4d044aa13b06ae50b4e468d6647bd7a9eb1cc3e (diff)
Core/Spells: Fix logic in SpellEffect::EffectWeaponDmg, it should fix SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL, SPELL_EFFECT_WEAPON_PERCENT_DAMAGE, SPELL_EFFECT_WEAPON_DAMAGE and SPELL_EFFECT_NORMALIZED_WEAPON_DMG.
Closes: #14675
-rw-r--r--src/server/game/Spells/SpellEffects.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 97e82426e9d..758b1cd6f6d 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -2934,8 +2934,9 @@ void Spell::EffectWeaponDmg(SpellEffIndex /*effIndex*/)
// multiple weapon dmg effect workaround
// execute only the last weapon damage
// and handle all effects at once
- for (SpellEffectInfo const* effect : GetEffects())
+ for (uint8 index = effIndex + 1; index < MAX_SPELL_EFFECTS; index++)
{
+ SpellEffectInfo const* effect = GetEffect(index);
if (!effect)
continue;
switch (effect->Effect)