Skip to content

Commit

Permalink
Spell: Clean up some extraneous bonus applications
Browse files Browse the repository at this point in the history
All of these abilities had data added in spell_template -> EffectBonusCoefficientFromAP fields.
Their SP/AP coefficients are currently applied twice incorrectly, so this code needs to be removed.
  • Loading branch information
MantisLord committed Feb 24, 2024
1 parent 93851f5 commit 0b0173d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 38 deletions.
2 changes: 2 additions & 0 deletions sql/base/dbc/cmangos_fixes/Spell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3611,6 +3611,8 @@ UPDATE spell_template SET EffectBonusCoefficientFromAP1=0.02 WHERE Id IN(13797,1
UPDATE spell_template SET EffectBonusCoefficientFromAP1=0.06325 WHERE Id IN(55095); -- Frost Fever
UPDATE spell_template SET EffectBonusCoefficientFromAP1=0.06325 WHERE Id IN(55078); -- Blood Plague

UPDATE spell_template SET EffectBonusCoefficient1=0.07, EffectBonusCoefficientFromAP1=0.07 WHERE Id IN (31935,32699,32700,48826,48827); -- Avenger's Shield (previously 0.09?)




38 changes: 0 additions & 38 deletions src/game/Spells/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,6 @@ void Spell::EffectSchoolDMG(SpellEffectIndex eff_idx)
damage = (20 - m_caster->GetDistance(x, y, z, DIST_CALC_COMBAT_REACH))*(damage / 20);
break;
}
// Intercept (warrior spell trigger)
case 20253:
case 61491:
{
damage += uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.12f);
break;
}
// percent max target health
case 29142: // Eyesore Blaster
case 35139: // Throw Boom's Doom
Expand Down Expand Up @@ -405,10 +398,6 @@ void Spell::EffectSchoolDMG(SpellEffectIndex eff_idx)
damage = unitTarget->GetMaxHealth() / 10;
break;
}
// Hand of Rekoning (name not have typos ;) )
case 67485:
damage += uint32(0.5f * m_caster->GetTotalAttackPowerValue(BASE_ATTACK));
break;
// Magic Bane normal (Forge of Souls - Bronjahm)
case 68793:
{
Expand Down Expand Up @@ -436,15 +425,6 @@ void Spell::EffectSchoolDMG(SpellEffectIndex eff_idx)
// Shield Slam
else if ((m_spellInfo->SpellFamilyFlags & uint64(0x0000020000000000)) && m_spellInfo->Category == 1209)
damage += int32(m_caster->GetShieldBlockValue());
// Revenge ${$m1+$AP*0.310} to ${$M1+$AP*0.310}
else if (m_spellInfo->SpellFamilyFlags & uint64(0x0000000000000400))
damage += uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.310f);
// Heroic Throw ${$m1+$AP*.50}
else if (m_spellInfo->SpellFamilyFlags & uint64(0x0000000100000000))
damage += uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.5f);
// Shattering Throw ${$m1+$AP*.50}
else if (m_spellInfo->SpellFamilyFlags & uint64(0x0040000000000000))
damage += uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.5f);
// Shockwave ${$m3/100*$AP}
else if (m_spellInfo->SpellFamilyFlags & uint64(0x0000800000000000))
{
Expand Down Expand Up @@ -723,24 +703,6 @@ void Spell::EffectSchoolDMG(SpellEffectIndex eff_idx)
if (stacks)
damage += damage * stacks * 10 / 100;
}
// Avenger's Shield ($m1+0.07*$SPH+0.07*$AP) - ranged sdb for future
else if (m_spellInfo->SpellFamilyFlags & uint64(0x0000000000004000))
{
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonusDone(GetSpellSchoolMask(m_spellInfo));
if (holy < 0)
holy = 0;
damage += int32(ap * 0.07f) + int32(holy * 7 / 100);
}
// Hammer of Wrath ($m1+0.15*$SPH+0.15*$AP) - ranged type sdb future fix
else if (m_spellInfo->SpellFamilyFlags & uint64(0x0000008000000000))
{
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonusDone(GetSpellSchoolMask(m_spellInfo));
if (holy < 0)
holy = 0;
damage += int32(ap * 0.15f) + int32(holy * 15 / 100);
}
// Hammer of the Righteous
else if (m_spellInfo->SpellFamilyFlags & uint64(0x0004000000000000))
{
Expand Down

0 comments on commit 0b0173d

Please sign in to comment.