Core/Spells: Fix Shield of Righteousness damage

Author: Dr.Tenma
Fixes issue #4174

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-11-09 11:15:00 +01:00
parent 8862663df0
commit ddc812163a
3 changed files with 9 additions and 3 deletions
+1
View File
@@ -16981,6 +16981,7 @@ INSERT INTO `spell_bonus_data` (`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`a
(25742, 0.07, -1, 0.039, -1, 'Paladin - Seal of Righteousness Dummy Proc'), (25742, 0.07, -1, 0.039, -1, 'Paladin - Seal of Righteousness Dummy Proc'),
(53719, 0, 0, 0, 0, 'Paladin - Seal of the Martyr Proc Enemy'), (53719, 0, 0, 0, 0, 'Paladin - Seal of the Martyr Proc Enemy'),
(53718, 0, 0, 0, 0, 'Paladin - Seal of the Martyr Proc Self'), (53718, 0, 0, 0, 0, 'Paladin - Seal of the Martyr Proc Self'),
(53600, 0, 0, 0, 0 ,'Paladin - Shield of Righteousness'),
(20267, 0, 0, 0, 0, 'Paladin - Judgement of Light Proc'), (20267, 0, 0, 0, 0, 'Paladin - Judgement of Light Proc'),
(25997, 0, 0, 0, 0, 'Paladin - Eye for an Eye'), (25997, 0, 0, 0, 0, 'Paladin - Eye for an Eye'),
(50256, -1, -1, 0.08, -1, 'Pet Skills - Bear (Swipe)'), (50256, -1, -1, 0.08, -1, 'Pet Skills - Bear (Swipe)'),
@@ -0,0 +1,3 @@
DELETE FROM `spell_bonus_data` WHERE `entry` = 53600;
INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(53600, 0, 0, 0, 0 ,'Paladin - Shield of Righteousness');
+5 -3
View File
@@ -732,13 +732,15 @@ void Spell::SpellDamageSchoolDmg(SpellEffIndex effIndex)
{ {
// Add main hand dps * effect[2] amount // Add main hand dps * effect[2] amount
float average = (m_caster->GetFloatValue(UNIT_FIELD_MINDAMAGE) + m_caster->GetFloatValue(UNIT_FIELD_MAXDAMAGE)) / 2; float average = (m_caster->GetFloatValue(UNIT_FIELD_MINDAMAGE) + m_caster->GetFloatValue(UNIT_FIELD_MAXDAMAGE)) / 2;
int32 count = m_caster->CalculateSpellDamage(unitTarget, m_spellInfo, 2); int32 count = m_caster->CalculateSpellDamage(unitTarget, m_spellInfo, EFFECT_2);
damage += count * int32(average * IN_MILLISECONDS) / m_caster->GetAttackTime(BASE_ATTACK); damage += count * int32(average * IN_MILLISECONDS) / m_caster->GetAttackTime(BASE_ATTACK);
break;
} }
// Shield of Righteousness // Shield of Righteousness
else if (m_spellInfo->SpellFamilyFlags[1]&0x00100000) if (m_spellInfo->SpellFamilyFlags[EFFECT_1] & 0x100000)
{ {
damage += int32(m_caster->GetShieldBlockValue() * 1.3f); damage += m_caster->GetShieldBlockValue() * SpellMgr::CalculateSpellEffectAmount(m_spellInfo, EFFECT_1) / 100;
break;
} }
break; break;
} }