fix(Core/Spells): Damage spell modifiers do not affect wands. (#9418)
Fixes #9130
This commit is contained in:
@@ -3613,7 +3613,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_spellInfo->SchoolMask & SPELL_SCHOOL_MASK_NORMAL)
|
if (m_spellSchoolMask & SPELL_SCHOOL_MASK_NORMAL)
|
||||||
{
|
{
|
||||||
float weapon_total_pct = m_caster->GetModifierValue(unitMod, TOTAL_PCT);
|
float weapon_total_pct = m_caster->GetModifierValue(unitMod, TOTAL_PCT);
|
||||||
fixed_bonus = int32(fixed_bonus * weapon_total_pct);
|
fixed_bonus = int32(fixed_bonus * weapon_total_pct);
|
||||||
@@ -3628,8 +3628,14 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
|
|||||||
if (Unit* owner = m_caster->GetOwner())
|
if (Unit* owner = m_caster->GetOwner())
|
||||||
weaponDamage = owner->CalculateDamage(m_attackType, normalized, true);
|
weaponDamage = owner->CalculateDamage(m_attackType, normalized, true);
|
||||||
}
|
}
|
||||||
|
else if (m_spellInfo->Id == 5019) // Wands
|
||||||
|
{
|
||||||
|
weaponDamage = m_caster->CalculateDamage(m_attackType, true, false);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
weaponDamage = m_caster->CalculateDamage(m_attackType, normalized, true);
|
weaponDamage = m_caster->CalculateDamage(m_attackType, normalized, true);
|
||||||
|
}
|
||||||
|
|
||||||
// Sequence is important
|
// Sequence is important
|
||||||
for (int j = 0; j < MAX_SPELL_EFFECTS; ++j)
|
for (int j = 0; j < MAX_SPELL_EFFECTS; ++j)
|
||||||
|
|||||||
Reference in New Issue
Block a user