[9150] Fixed some paladin spell bonuses

* Use stack size in additional spell damage for 31803/53742.
* Use in code calculation for additional spell 20187/20375 damage

Thanks to MrLama for small cleanups and patch updating.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
KAPATEJIb 2010-01-12 01:53:54 +03:00 committed by VladimirMangos
parent 73a368d64a
commit 171a2e02d7
7 changed files with 37 additions and 20 deletions

View file

@ -638,8 +638,16 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
}
case SPELLFAMILY_PALADIN:
{
// Judgement of Righteousness - receive benefit from Spell Damage and Attack power
if (m_spellInfo->Id == 20187)
{
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget);
damage += int32(ap * 0.2f) + int32(holy * 32 / 100);
}
// Judgement of Vengeance/Corruption ${1+0.22*$SPH+0.14*$AP} + 10% for each application of Holy Vengeance/Blood Corruption on the target
if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x800000000)) && m_spellInfo->SpellIconID==2292)
else if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x800000000)) && m_spellInfo->SpellIconID==2292)
{
uint32 debuf_id;
switch(m_spellInfo->Id)
@ -1815,14 +1823,6 @@ void Spell::EffectDummy(uint32 i)
switch(m_spellInfo->Id)
{
// Judgement of Righteousness (0.2*$AP+0.32*$SPH) holy added in spellDamagBonus
case 20187:
{
if (!unitTarget)
return;
m_damage+=int32(0.2f*m_caster->GetTotalAttackPowerValue(BASE_ATTACK));
return;
}
case 31789: // Righteous Defense (step 1)
{
if (m_caster->GetTypeId() != TYPEID_PLAYER)
@ -4628,12 +4628,13 @@ void Spell::EffectWeaponDmg(uint32 i)
}
case SPELLFAMILY_PALADIN:
{
// Seal of Command - receive benefit from Spell Damage and Healing
if(m_spellInfo->SpellFamilyFlags & UI64LIT(0x00000002000000))
// Judgement of Command - receive benefit from Spell Damage and Attack Power
if(m_spellInfo->SpellFamilyFlags & UI64LIT(0x00020000000000))
{
spellBonusNeedWeaponDamagePercentMod = true;// apply weaponDamagePercentMod to spell_bonus (and then to all bonus, fixes and weapon already have applied)
spell_bonus += int32(0.23f*m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)));
spell_bonus += int32(0.29f*m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget));
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget);
spell_bonus += int32(ap * 0.08f) + int32(holy * 13 / 100);
}
break;
}