Core/Spells: Destabilize Azure Dragonshrine

*Spell script support for spell 49370
This commit is contained in:
thesensei
2012-08-28 20:58:03 +03:00
parent ec527fa172
commit 66917624bb
2 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
-- Spell script name linking for Defending Wyrmrest Temple: Destabilize Azure Dragonshrine Effect
DELETE FROM `spell_script_names` WHERE `spell_id`=49370 ;
INSERT INTO `spell_script_names` VALUES
(49370,'spell_q12372_destabilize_azure_dragonshrine_dummy');

View File

@@ -1276,6 +1276,46 @@ class spell_q12372_cast_from_gossip_trigger : public SpellScriptLoader
}
};
// http://www.wowhead.com/quest=12372 Defending Wyrmrest Temple
// 49370 - Wyrmrest Defender: Destabilize Azure Dragonshrine Effect
enum eQuest12372Data
{
NPC_WYRMREST_TEMPLE_CREDIT = 27698,
};
class spell_q12372_destabilize_azure_dragonshrine_dummy : public SpellScriptLoader
{
public:
spell_q12372_destabilize_azure_dragonshrine_dummy() : SpellScriptLoader("spell_q12372_destabilize_azure_dragonshrine_dummy") { }
class spell_q12372_destabilize_azure_dragonshrine_dummy_SpellScript : public SpellScript
{
PrepareSpellScript(spell_q12372_destabilize_azure_dragonshrine_dummy_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (GetHitCreature())
{
if (Unit* caster = GetOriginalCaster())
if (Vehicle* vehicle = caster->GetVehicleKit())
if (Unit* passenger = vehicle->GetPassenger(0))
if (Player* player = passenger->ToPlayer())
player->KilledMonsterCredit(NPC_WYRMREST_TEMPLE_CREDIT, 0);
}
}
void Register()
{
OnEffectHitTarget += SpellEffectFn(spell_q12372_destabilize_azure_dragonshrine_dummy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
{
return new spell_q12372_destabilize_azure_dragonshrine_dummy_SpellScript();
}
};
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -1306,4 +1346,5 @@ void AddSC_quest_spell_scripts()
new spell_q12066_bunny_kill_credit();
new spell_q12735_song_of_cleansing();
new spell_q12372_cast_from_gossip_trigger();
new spell_q12372_destabilize_azure_dragonshrine_dummy();
}