aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-04-19 19:57:46 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-04-19 19:57:46 +0200
commit8a110f2645efdba4e15ddd13745b1b4110a7c8cb (patch)
tree1197c8abce2c2acf0d2384663551df663ff1d220 /src/server/scripts/Spells
parent5454e10b52c6e8c75afba25a1cc8fb13c6ef8dcc (diff)
parent93a68a66c3009ea86569076ea05a39ce87dfb78d (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/DataStores/DBCStores.cpp src/server/game/DataStores/DBCStructure.h src/server/game/DataStores/DBCfmt.h src/server/game/Entities/Unit/Unit.cpp src/server/game/Spells/SpellMgr.cpp src/server/scripts/Commands/cs_gobject.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_kilnara.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp src/server/scripts/Spells/spell_paladin.cpp
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp50
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp41
2 files changed, 91 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index abb14a9cc5d..992f6fdbcfb 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -60,6 +60,8 @@ enum PaladinSpells
SPELL_PALADIN_RIGHTEOUS_DEFENSE_TAUNT = 31790,
SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA = 63531,
SPELL_PALADIN_SANCTIFIED_RETRIBUTION_R1 = 31869,
+ SPELL_PALADIN_SANCTIFIED_WRATH = 57318,
+ SPELL_PALADIN_SANCTIFIED_WRATH_TALENT_R1 = 53375,
SPELL_PALADIN_SEAL_OF_RIGHTEOUSNESS = 25742,
SPELL_PALADIN_SWIFT_RETRIBUTION_R1 = 53379
};
@@ -227,6 +229,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();
+ }
+};
+
// 53651 - Beacon of Light
class spell_pal_beacon_of_light : public SpellScriptLoader
{
@@ -288,6 +336,7 @@ class spell_pal_beacon_of_light : public SpellScriptLoader
}
};
+
// 37877 - Blessing of Faith
class spell_pal_blessing_of_faith : public SpellScriptLoader
{
@@ -1149,6 +1198,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_beacon_of_light();
new spell_pal_blessing_of_faith();
new spell_pal_divine_sacrifice();
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index d1b32570795..b9fd07293cd 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -2276,6 +2276,46 @@ class spell_q13400_illidan_kill_master : public SpellScriptLoader
}
};
+enum RelicOfTheEarthenRing
+{
+ SPELL_TOTEM_OF_THE_EARTHEN_RING = 66747
+};
+
+// 66744 - Make Player Destroy Totems
+class spell_q14100_q14111_make_player_destroy_totems : public SpellScriptLoader
+{
+ public:
+ spell_q14100_q14111_make_player_destroy_totems() : SpellScriptLoader("spell_q14100_q14111_make_player_destroy_totems") { }
+
+ class spell_q14100_q14111_make_player_destroy_totems_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_q14100_q14111_make_player_destroy_totems_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_TOTEM_OF_THE_EARTHEN_RING))
+ return false;
+ return true;
+ }
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (Player* player = GetHitPlayer())
+ player->CastSpell(player, SPELL_TOTEM_OF_THE_EARTHEN_RING, TRIGGERED_FULL_MASK); // ignore reagent cost, consumed by quest
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q14100_q14111_make_player_destroy_totems_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_q14100_q14111_make_player_destroy_totems_SpellScript();
+ }
+};
+
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -2331,4 +2371,5 @@ void AddSC_quest_spell_scripts()
new spell_q12919_gymers_grab();
new spell_q12919_gymers_throw();
new spell_q13400_illidan_kill_master();
+ new spell_q14100_q14111_make_player_destroy_totems();
}