aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author_manuel_ <manue.l@live.com.ar>2010-04-01 12:58:02 -0300
committer_manuel_ <manue.l@live.com.ar>2010-04-01 12:58:02 -0300
commit9f544d2f934420be5c6ce0bbe3db5d84153c9d61 (patch)
tree77d073134dd068c73cba2abad90ad74f9e61fd77 /src
parentab4c7cbd983c6efc51ee37846e15fdc804487829 (diff)
Implemented script for vendor/trainer Hira Snowdawn.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/scripts/northrend/dalaran.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/scripts/northrend/dalaran.cpp b/src/scripts/northrend/dalaran.cpp
index 903118444ae..61dc6abc7cb 100644
--- a/src/scripts/northrend/dalaran.cpp
+++ b/src/scripts/northrend/dalaran.cpp
@@ -105,6 +105,38 @@ CreatureAI* GetAI_npc_mageguard_dalaran(Creature* pCreature)
return new npc_mageguard_dalaranAI(pCreature);
}
+/*######
+## npc_hira_snowdawn
+######*/
+
+#define GOSSIP_TEXT_TRAIN_HIRA "I seek training to ride a steed."
+
+bool GossipHello_npc_hira_snowdawn(Player* pPlayer, Creature* pCreature)
+{
+ if (!pCreature->isVendor() || !pCreature->isTrainer())
+ return false;
+
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_TRAIN_HIRA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
+
+ if (pPlayer->getLevel() == 80)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
+
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+
+ return true;
+}
+
+bool GossipSelect_npc_hira_snowdawn(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ if (uiAction == GOSSIP_ACTION_TRAIN)
+ pPlayer->SEND_TRAINERLIST(pCreature->GetGUID());
+
+ if (uiAction == GOSSIP_ACTION_TRADE)
+ pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
+
+ return true;
+}
+
void AddSC_dalaran()
{
Script *newscript;
@@ -113,4 +145,10 @@ void AddSC_dalaran()
newscript->Name = "npc_mageguard_dalaran";
newscript->GetAI = &GetAI_npc_mageguard_dalaran;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_hira_snowdawn";
+ newscript->pGossipHello = &GossipHello_npc_hira_snowdawn;
+ newscript->pGossipSelect = &GossipSelect_npc_hira_snowdawn;
+ newscript->RegisterSelf();
}