Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 6b887bfed2acd572e07f3768d3941a47762941b2 Mon Sep 17 00:00:00 2001
- From: unknown <cristi@cristis-PC.(none)>
- Date: Sat, 14 Jul 2012 22:38:59 +0300
- Subject: [PATCH] Fix Quest Defending the Wyrmrest Temple
- ---
- src/server/scripts/Northrend/dragonblight.cpp | 96 +++++++++++++++++++++++++
- 1 file changed, 96 insertions(+)
- diff --git a/src/server/scripts/Northrend/dragonblight.cpp b/src/server/scripts/Northrend/dragonblight.cpp
- index 1b339b2..fc67884 100644
- --- a/src/server/scripts/Northrend/dragonblight.cpp
- +++ b/src/server/scripts/Northrend/dragonblight.cpp
- @@ -69,6 +69,98 @@ public:
- }
- };
- +/*########
- +### Support for quest Defending the WirmRest Temple
- +###################*/
- +
- +#define GOSSIP_ITEM_FLIGHT "We need to get into the flight. Are you ready?"
- +
- +enum DefendingWyrmrestEntries
- +{
- + QUEST_DEFEND_WYRMREST_TEMPLE = 12372,
- + NPC_DEFENDING_WRM_KILL_CREDIT = 27698,
- + SPELL_SUMMON_WYRMREST_DEFENDER = 49207,
- + SPELL_DESTABILIZE_DRAGONSHIRE = 49367,
- + ZONE_AZURE_DRAGONSHIRE = 4183
- +};
- +
- +class npc_wyrmrest_defender : public CreatureScript
- +{
- +public:
- + npc_wyrmrest_defender() : CreatureScript("npc_wyrmrest_defender") { }
- +
- + bool OnGossipHello(Player* player, Creature* creature)
- + {
- + if (player->GetQuestStatus(QUEST_DEFEND_WYRMREST_TEMPLE)==QUEST_STATUS_INCOMPLETE)
- + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- +
- + player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
- + return true;
- + }
- +
- + bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action)
- + {
- + player->PlayerTalkClass->ClearMenus();
- + if (action == GOSSIP_ACTION_INFO_DEF+1)
- + {
- + player->CLOSE_GOSSIP_MENU();
- + player->CastSpell(player,SPELL_SUMMON_WYRMREST_DEFENDER);
- + }
- +
- + return true;
- + }
- +};
- +
- +class spell_destabilize_dragonshire : public SpellScriptLoader
- +{
- +public:
- + spell_destabilize_dragonshire() : SpellScriptLoader("spell_destabilize_dragonshire") {}
- +
- + class spell_destabilize_dragonshire_SpellScript : public SpellScript
- + {
- + PrepareSpellScript(spell_destabilize_dragonshire_SpellScript)
- +
- + bool Validate(SpellInfo const* /*spell*/)
- + {
- + if (!sSpellMgr->GetSpellInfo(SPELL_DESTABILIZE_DRAGONSHIRE))
- + return false;
- + return true;
- + }
- +
- + SpellCastResult CheckIfInZone()
- + {
- + Unit* caster = GetCaster();
- +
- + if(caster->GetAreaId()==ZONE_AZURE_DRAGONSHIRE)
- + return SPELL_CAST_OK;
- + else
- + return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
- + }
- +
- + void HandleBombEffect()
- + {
- + Unit* caster = GetCaster();
- + Player* player = caster->GetCharmerOrOwnerPlayerOrPlayerItself();
- +
- + if (player && (player->GetQuestStatus(QUEST_DEFEND_WYRMREST_TEMPLE)==QUEST_STATUS_INCOMPLETE))
- + {
- + player->KilledMonsterCredit(NPC_DEFENDING_WRM_KILL_CREDIT,0);
- + }
- + }
- + void Register()
- + {
- + OnCheckCast += SpellCheckCastFn(spell_destabilize_dragonshire_SpellScript::CheckIfInZone);
- + OnCast += SpellCastFn(spell_destabilize_dragonshire_SpellScript::HandleBombEffect);//, EFFECT_0, SPELL_EFFECT_DUMMY);
- + }
- +
- + };
- +
- + SpellScript* GetSpellScript() const
- + {
- + return new spell_destabilize_dragonshire_SpellScript();
- + }
- +};
- +
- /*######
- ## Quest Strengthen the Ancients (12096|12092)
- ######*/
- @@ -134,6 +226,8 @@ public:
- }
- };
- +
- +
- class spell_q12096_q12092_bark : public SpellScriptLoader // Bark of the Walkers
- {
- public:
- @@ -171,4 +265,6 @@ void AddSC_dragonblight()
- new npc_alexstrasza_wr_gate;
- new spell_q12096_q12092_dummy;
- new spell_q12096_q12092_bark;
- + new spell_destabilize_dragonshire;
- + new npc_wyrmrest_defender;
- }
- --
- 1.7.10.msysgit.1
Advertisement
Add Comment
Please, Sign In to add comment