aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/FULL/world_scripts_full.sql1
-rw-r--r--sql/updates/7739_world_scriptname.sql1
-rw-r--r--src/scripts/northrend/dalaran.cpp38
3 files changed, 40 insertions, 0 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index c87f9e61963..146465b3e0f 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -518,6 +518,7 @@ UPDATE `creature_template` SET `ScriptName`='mob_shield_generator_channel' WHERE
/* DALARAN */
UPDATE `creature_template` SET `ScriptName`='npc_mageguard_dalaran' WHERE `entry` IN (29254,29255);
+UPDATE `creature_template` SET `ScriptName`='npc_hira_snowdawn' WHERE `entry`=31238;
/* DARKSHORE */
UPDATE `creature_template` SET `ScriptName`='npc_kerlonian' WHERE `entry`=11218;
diff --git a/sql/updates/7739_world_scriptname.sql b/sql/updates/7739_world_scriptname.sql
new file mode 100644
index 00000000000..407466425aa
--- /dev/null
+++ b/sql/updates/7739_world_scriptname.sql
@@ -0,0 +1 @@
+UPDATE `creature_template` SET `ScriptName`='npc_hira_snowdawn' WHERE `entry`=31238;
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();
}