aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShocker <none@none>2010-08-25 18:24:40 +0300
committerShocker <none@none>2010-08-25 18:24:40 +0300
commitbd2ffab07a28b61dd3e2c3deadb4ce187c823f76 (patch)
tree714ea6e08f25bd10536e1f9a949a8375d69b46ec
parent2c7cc99937411d909b0ab6e4e4e7d76f2c4b49dd (diff)
* Move Paladin Judgement bonuses to spell_bonus_data, thanks deltapower.inc
* Avoid code duplication by moving spell interrupt code for jump effects to a common function for both EffectJump and EffectJumpDest, thanks devthenecro --HG-- branch : trunk
-rw-r--r--sql/base/world_database.sql8
-rw-r--r--sql/updates/9587_world_spell_bonus_data.sql5
-rw-r--r--src/server/game/Movement/MotionMaster.cpp4
-rw-r--r--src/server/game/Spells/SpellEffects.cpp24
4 files changed, 12 insertions, 29 deletions
diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql
index 7c9b38ecdb4..3ab2e377478 100644
--- a/sql/base/world_database.sql
+++ b/sql/base/world_database.sql
@@ -5153,13 +5153,11 @@ INSERT INTO `spell_bonus_data` (`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`a
(32220, 0.0833, -1, 0.0533, -1, 'Paladin - Judgement of Blood Self'),
(20467, 0.25, -1, 0.16, -1, 'Paladin - Judgement of Command'),
(53733, 0.22, -1, 0.14, -1, 'Paladin - Judgement of Corruption'),
--- (20187, 0.4, -1, 0.25, -1, 'Paladin - Judgement of Righteousness'),
-(20187, 0, 0, 0, 0, 'Paladin - Judgement of Righteousness'),
+(20187, 0.32, 0, 0.2, 0, 'Paladin - Judgement of Righteousness'),
(53726, 0.25, -1, 0.16, -1, 'Paladin - Judgement of the Martyr Enemy'),
(53725, 0.0833, -1, 0.0533, -1, 'Paladin - Judgement of the Martyr Self'),
-(31804, 0.22, -1, 0.14, -1, 'Paladin - Judgement of Vengeance'),
--- (54158, 0.25, -1, 0.16, -1, 'Paladin - Judgement (Seal of Light, Seal of Wisdom, Seal of Justice)'),
-(54158, 0, 0, 0, 0, 'Paladin - Judgement (Seal of Light, Seal of Wisdom, Seal of Justice)'),
+(31804, 0.22, 0, 0.14, 0, 'Paladin - Judgement of Vengeance'),
+(54158, 0.25, 0, 0.16, 0, 'Paladin - Judgement (Seal of Light, Seal of Wisdom, Seal of Justice)'),
(58597, 0.75, -1, -1, -1, 'Paladin - Sacred Shield'),
(53601, 0.75, -1, -1, -1, 'Paladin - Sacred Shield'),
(31893, 0, 0, 0, 0, 'Paladin - Seal of Blood Proc Enemy'),
diff --git a/sql/updates/9587_world_spell_bonus_data.sql b/sql/updates/9587_world_spell_bonus_data.sql
new file mode 100644
index 00000000000..051abbf1f00
--- /dev/null
+++ b/sql/updates/9587_world_spell_bonus_data.sql
@@ -0,0 +1,5 @@
+DELETE FROM `spell_bonus_data` WHERE `entry` IN (54158, 20187, 31804);
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+(54158, 0.25, 0, 0.16, 0, 'Paladin - Judgement (Seal of Light, Seal of Wisdom, Seal of Justice)'),
+(20187, 0.32, 0, 0.2, 0, 'Paladin - Judgement of Righteousness'),
+(31804, 0.22, 0, 0.14, 0, 'Paladin - Judgement of Vengeance'); \ No newline at end of file
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 5094589f921..618849d0ff7 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -327,6 +327,10 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee
uint32 moveFlag = SPLINEFLAG_TRAJECTORY | SPLINEFLAG_WALKING;
uint32 time = uint32(speedZ * 100);
+ // Instantly interrupt non melee spells being casted
+ if (i_owner->IsNonMeleeSpellCasted(true))
+ i_owner->InterruptNonMeleeSpells(true);
+
i_owner->addUnitState(UNIT_STAT_CHARGING | UNIT_STAT_JUMPING);
i_owner->m_TempSpeed = speedXY;
if (i_owner->GetTypeId() == TYPEID_PLAYER)
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index ad908cc26ec..3e870182e63 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -733,22 +733,6 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
{
damage += int32(m_caster->GetShieldBlockValue() * 1.3f);
}
- // Judgements
- else switch (m_spellInfo->Id)
- {
- case 20187:
- case 54158:
- case 31804:
- float attackPower = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
- float spellPower = (float)(m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)));
- if (m_spellInfo->Id == 20187) // Judgement of Righteousness
- damage += int32(0.2f * attackPower + 0.32f * spellPower);
- if (m_spellInfo->Id == 54158) // Judgement of Wisdom, Light, Justice
- damage += int32(0.16f * attackPower + 0.25f * spellPower);
- if (m_spellInfo->Id == 31804) // Judgement of Vengeance
- damage += int32(0.14f * attackPower + 0.22f * spellPower);
- break;
- }
break;
}
case SPELLFAMILY_DEATHKNIGHT:
@@ -2100,10 +2084,6 @@ void Spell::EffectJump(uint32 i)
if (m_caster->isInFlight())
return;
- // Instantly interrupt non melee spells being casted
- if (m_caster->IsNonMeleeSpellCasted(true))
- m_caster->InterruptNonMeleeSpells(true);
-
float x,y,z,o;
if (m_targets.getUnitTarget())
{
@@ -2131,10 +2111,6 @@ void Spell::EffectJumpDest(uint32 i)
if (m_caster->isInFlight())
return;
- // Instantly interrupt non melee spells being casted
- if (m_caster->IsNonMeleeSpellCasted(true))
- m_caster->InterruptNonMeleeSpells(true);
-
// Init dest coordinates
float x,y,z,o;
if (m_targets.HasDst())