aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2013-07-28 16:02:49 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2013-07-28 16:02:59 +0200
commit706c5a1975402191bf3847d0cc27e960318f86a7 (patch)
tree3956a85b814b9555a584d549db07b0b5fb88a42e /src/server/scripts
parent036286cb48adcc21d37c89241f3f67d6049064e4 (diff)
Core/Spells: Update/Convert paladin "Beacon of Light" for 4.3.4
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index 1a7dd7fb54d..0c660cf2eaa 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -29,6 +29,8 @@
enum PaladinSpells
{
+ SPELL_PALADIN_BEACON_OF_LIGHT_MARKER = 53563,
+ SPELL_PALADIN_BEACON_OF_LIGHT_HEAL = 53652,
SPELL_PALADIN_BLESSING_OF_LOWER_CITY_DRUID = 37878,
SPELL_PALADIN_BLESSING_OF_LOWER_CITY_PALADIN = 37879,
SPELL_PALADIN_BLESSING_OF_LOWER_CITY_PRIEST = 37880,
@@ -43,6 +45,7 @@ enum PaladinSpells
SPELL_PALADIN_FORBEARANCE = 25771,
SPELL_PALADIN_GLYPH_OF_SALVATION = 63225,
SPELL_PALADIN_HAND_OF_SACRIFICE = 6940,
+ SPELL_PALADIN_HOLY_LIGHT = 635,
SPELL_PALADIN_HOLY_SHOCK_R1 = 20473,
SPELL_PALADIN_HOLY_SHOCK_R1_DAMAGE = 25912,
SPELL_PALADIN_HOLY_SHOCK_R1_HEALING = 25914,
@@ -246,6 +249,67 @@ class spell_pal_divine_sacrifice : public SpellScriptLoader
}
};
+// 53651 - Beacon of Light
+class spell_pal_beacon_of_light : public SpellScriptLoader
+{
+ public:
+ spell_pal_beacon_of_light() : SpellScriptLoader("spell_pal_beacon_of_light") { }
+
+ class spell_pal_beacon_of_light_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_pal_beacon_of_light_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_BEACON_OF_LIGHT_HEAL))
+ return false;
+ return true;
+ }
+
+ bool CheckProc(ProcEventInfo& eventInfo)
+ {
+ if (eventInfo.GetActionTarget()->GetAura(SPELL_PALADIN_BEACON_OF_LIGHT_MARKER, GetCasterGUID()))
+ return false;
+ return true;
+ }
+
+ void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
+ {
+ PreventDefaultAction();
+ int32 heal = eventInfo.GetHealInfo()->GetHeal();
+
+ if (eventInfo.GetDamageInfo()->GetSpellInfo()->Id != SPELL_PALADIN_HOLY_LIGHT)
+ heal = int32(CalculatePct(heal, aurEff->GetAmount()));
+
+ Unit::AuraList const& auras = GetCaster()->GetSingleCastAuras();
+ for (Unit::AuraList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ {
+ if ((*itr)->GetId() == SPELL_PALADIN_BEACON_OF_LIGHT_MARKER)
+ {
+ std::list<AuraApplication*> applications;
+ (*itr)->GetApplicationList(applications);
+ if (applications.empty())
+ return;
+
+ GetCaster()->CastCustomSpell(SPELL_PALADIN_BEACON_OF_LIGHT_HEAL, SPELLVALUE_BASE_POINT0, heal, applications.front()->GetTarget(), true, NULL, aurEff);
+ return;
+ }
+ }
+ }
+
+ void Register() OVERRIDE
+ {
+ DoCheckProc += AuraCheckProcFn(spell_pal_beacon_of_light_AuraScript::CheckProc);
+ OnEffectProc += AuraEffectProcFn(spell_pal_beacon_of_light_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_pal_beacon_of_light_AuraScript();
+ }
+};
+
// 53385 - Divine Storm
class spell_pal_divine_storm : public SpellScriptLoader
{
@@ -829,6 +893,7 @@ class spell_pal_seal_of_righteousness : public SpellScriptLoader
void AddSC_paladin_spell_scripts()
{
//new spell_pal_ardent_defender();
+ new spell_pal_beacon_of_light();
new spell_pal_blessing_of_faith();
new spell_pal_divine_sacrifice();
new spell_pal_divine_storm();