aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoruntaught <untaugh@mail.bg>2014-04-14 19:48:13 +0200
committerjoschiwald <joschiwald.trinity@gmail.com>2014-04-14 19:48:13 +0200
commitb9a62115b17381a7e8371c1df1ebfd4a4165ac59 (patch)
tree71d3c27a79be4ecd7542065798379a671f1c726b /src
parent6464cfd0331494417967f5c45a94b65fc5dd4b16 (diff)
Core/Spells: fixed Relic of the Earthen Ring
Closes #11282
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index d1b32570795..f436803cb89 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, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST));
+ }
+
+ 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();
}