Core/Spells: fixed Relic of the Earthen Ring

Closes #11282
This commit is contained in:
untaught
2014-04-14 19:48:13 +02:00
committed by joschiwald
parent 6464cfd033
commit b9a62115b1
2 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=66744;
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(66744,'spell_q14100_q14111_make_player_destroy_totems');

View File

@@ -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();
}