aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUnholychick <lucas__jensen@hotmail.com>2014-04-18 20:21:05 +0200
committerjoschiwald <joschiwald.trinity@gmail.com>2014-04-18 20:21:05 +0200
commit574fa30ea6924902af1d845e667f38c043b32e94 (patch)
tree7731303fe94c98a59ae83d08edfff4f1e0a62303 /src
parent89cc056a506e6df2e9819860ae55bfba1699dd49 (diff)
Core/Spells: Convert Avenging Wrath to spellscript
Closes #11896 Closes #3464
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp9
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp50
2 files changed, 50 insertions, 9 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 9cc214b7390..06628de4050 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -6363,15 +6363,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
CastSpell(this, 57669, true, castItem, triggeredByAura);
break;
}
- // Sanctified Wrath
- if (dummySpell->SpellIconID == 3029)
- {
- triggered_spell_id = 57318;
- target = this;
- basepoints0 = triggerAmount;
- CastCustomSpell(target, triggered_spell_id, &basepoints0, &basepoints0, NULL, true, castItem, triggeredByAura);
- return true;
- }
// Righteous Vengeance
if (dummySpell->SpellIconID == 3025)
{
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index b5265561d85..2b1cafbdd26 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -66,6 +66,9 @@ enum PaladinSpells
SPELL_PALADIN_RIGHTEOUS_DEFENSE_TAUNT = 31790,
+ SPELL_PALADIN_SANCTIFIED_WRATH = 57318,
+ SPELL_PALADIN_SANCTIFIED_WRATH_TALENT_R1 = 53375,
+
SPELL_PALADIN_SEAL_OF_RIGHTEOUSNESS = 25742,
SPELL_PALADIN_CONCENTRACTION_AURA = 19746,
@@ -236,6 +239,52 @@ class spell_pal_aura_mastery_immune : public SpellScriptLoader
}
};
+// 31884 - Avenging Wrath
+class spell_pal_avenging_wrath : public SpellScriptLoader
+{
+ public:
+ spell_pal_avenging_wrath() : SpellScriptLoader("spell_pal_avenging_wrath") { }
+
+ class spell_pal_avenging_wrath_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_pal_avenging_wrath_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_SANCTIFIED_WRATH)
+ || !sSpellMgr->GetSpellInfo(SPELL_PALADIN_SANCTIFIED_WRATH_TALENT_R1))
+ return false;
+ return true;
+ }
+
+ void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ if (AuraEffect const* aurEff = target->GetAuraEffectOfRankedSpell(SPELL_PALADIN_SANCTIFIED_WRATH_TALENT_R1, EFFECT_2))
+ {
+ int32 basepoints = aurEff->GetAmount();
+ target->CastCustomSpell(target, SPELL_PALADIN_SANCTIFIED_WRATH, &basepoints, &basepoints, NULL, true, NULL, aurEff);
+ }
+ }
+
+ void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ GetTarget()->RemoveAurasDueToSpell(SPELL_PALADIN_SANCTIFIED_WRATH);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectApply += AuraEffectApplyFn(spell_pal_avenging_wrath_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_pal_avenging_wrath_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_pal_avenging_wrath_AuraScript();
+ }
+};
+
// 37877 - Blessing of Faith
class spell_pal_blessing_of_faith : public SpellScriptLoader
{
@@ -1233,6 +1282,7 @@ void AddSC_paladin_spell_scripts()
new spell_pal_ardent_defender();
new spell_pal_aura_mastery();
new spell_pal_aura_mastery_immune();
+ new spell_pal_avenging_wrath();
new spell_pal_blessing_of_faith();
new spell_pal_blessing_of_sanctuary();
new spell_pal_divine_sacrifice();