aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 06462af0ff9..eb983373d24 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -2794,8 +2794,12 @@ void Spell::EffectWeaponDmg()
// multiple weapon dmg effect workaround
// execute only the last weapon damage
// and handle all effects at once
+ uint32 effectMask = std::ranges::find(m_UniqueTargetInfo, unitTarget->GetGUID(), &TargetInfo::TargetGUID)->EffectMask;
for (size_t j = effectInfo->EffectIndex + 1; j < m_spellInfo->GetEffects().size(); ++j)
{
+ if (!(effectMask & (1 << j)))
+ continue;
+
switch (m_spellInfo->GetEffect(SpellEffIndex(j)).Effect)
{
case SPELL_EFFECT_WEAPON_DAMAGE:
@@ -2829,6 +2833,9 @@ void Spell::EffectWeaponDmg()
float weaponDamagePercentMod = 1.0f;
for (SpellEffectInfo const& spellEffectInfo : m_spellInfo->GetEffects())
{
+ if (!(effectMask & (1 << spellEffectInfo.EffectIndex)))
+ continue;
+
switch (spellEffectInfo.Effect)
{
case SPELL_EFFECT_WEAPON_DAMAGE:
@@ -2874,6 +2881,9 @@ void Spell::EffectWeaponDmg()
// Sequence is important
for (SpellEffectInfo const& spellEffectInfo : m_spellInfo->GetEffects())
{
+ if (!(effectMask & (1 << spellEffectInfo.EffectIndex)))
+ continue;
+
// We assume that a spell have at most one fixed_bonus
// and at most one weaponDamagePercentMod
switch (spellEffectInfo.Effect)