fix(Core/Spells): Damage spell modifiers do not affect wands. (#9418)

Fixes #9130
This commit is contained in:
UltraNix
2021-12-09 12:11:58 +01:00
committed by GitHub
parent bfffa70982
commit 52d4c43bcf

View File

@@ -3613,7 +3613,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
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);
fixed_bonus = int32(fixed_bonus * weapon_total_pct);
@@ -3628,8 +3628,14 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
if (Unit* owner = m_caster->GetOwner())
weaponDamage = owner->CalculateDamage(m_attackType, normalized, true);
}
else if (m_spellInfo->Id == 5019) // Wands
{
weaponDamage = m_caster->CalculateDamage(m_attackType, true, false);
}
else
{
weaponDamage = m_caster->CalculateDamage(m_attackType, normalized, true);
}
// Sequence is important
for (int j = 0; j < MAX_SPELL_EFFECTS; ++j)