aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Northrend
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2012-08-27 05:49:47 -0700
committerNay <dnpd.dd@gmail.com>2012-08-27 05:49:47 -0700
commitb8bca936e841ce9b7e6a54790508ec672e490d1e (patch)
treecc7b981072c8cc6102721215c1f2fa2a253a72ec /src/server/scripts/Northrend
parent5aee9433e118c2ac27a135cfa8deb3446f498396 (diff)
parente0e636577f5b61fe4d0839284fefafb54b99bfe5 (diff)
Merge pull request #7524 from Trista/master
[Core/Scripts] Defending Wyrmrest Temple
Diffstat (limited to 'src/server/scripts/Northrend')
-rw-r--r--src/server/scripts/Northrend/dragonblight.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/dragonblight.cpp b/src/server/scripts/Northrend/dragonblight.cpp
index ecc012eb25d..fa64e350e36 100644
--- a/src/server/scripts/Northrend/dragonblight.cpp
+++ b/src/server/scripts/Northrend/dragonblight.cpp
@@ -170,9 +170,48 @@ public:
}
};
+/*######
+## wyrmrest_defender
+######*/
+
+enum Spells
+{
+ SPELL_CHARACTER_SCRIPT = 49213
+};
+
+#define GOSSIP_ITEM_1 "We need to get into the fight. Are you ready?"
+
+class npc_wyrmrest_defender : public CreatureScript
+{
+ public:
+ npc_wyrmrest_defender() : CreatureScript("npc_wyrmrest_defender") { }
+
+ bool OnGossipHello(Player* player, Creature* creature)
+ {
+ player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, 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 /*uiSender*/, uint32 uiAction)
+ {
+ player->PlayerTalkClass->ClearMenus();
+ if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
+ {
+ player->CLOSE_GOSSIP_MENU();
+ //Makes player cast trigger spell for 49207 on self
+ player->CastSpell(player, SPELL_CHARACTER_SCRIPT, true);
+ }
+
+ return true;
+ }
+};
+
void AddSC_dragonblight()
{
new npc_alexstrasza_wr_gate;
new spell_q12096_q12092_dummy;
new spell_q12096_q12092_bark;
+ new npc_wyrmrest_defender;
}