diff options
-rw-r--r-- | sql/FULL/world_scripts_full.sql | 3 | ||||
-rw-r--r-- | sql/updates/5637_world_scripts.sql | 2 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/northrend/storm_peaks.cpp | 62 |
3 files changed, 66 insertions, 1 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index 0185b195e1e..dc29e6fb5ef 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -878,9 +878,10 @@ UPDATE `creature_template` SET `ScriptName`='npc_deathstalker_erland' WHERE `ent UPDATE `creature_template` SET `ScriptName`='npc_braug_dimspirit' WHERE `entry`=4489; UPDATE `creature_template` SET `ScriptName`='npc_kaya_flathoof' WHERE `entry`=11856; -/* Storm Peaks */ +/* STORM PEAKS */ UPDATE `creature_template` SET `ScriptName`='npc_agnetta_tyrsdottar' WHERE `entry`=30154; UPDATE `creature_template` SET `ScriptName`='npc_frostborn_scout' WHERE `entry`=29811; +UPDATE `creature_template` SET `ScriptName`='npc_thorim' WHERE `entry`=29445; /* STORMWIND CITY */ UPDATE `creature_template` SET `ScriptName`='npc_archmage_malin' WHERE `entry`=2708; diff --git a/sql/updates/5637_world_scripts.sql b/sql/updates/5637_world_scripts.sql new file mode 100644 index 00000000000..a6ac84e7b5d --- /dev/null +++ b/sql/updates/5637_world_scripts.sql @@ -0,0 +1,2 @@ + +UPDATE `creature_template` SET `ScriptName`='npc_thorim' WHERE `entry`=29445; diff --git a/src/bindings/scripts/scripts/northrend/storm_peaks.cpp b/src/bindings/scripts/scripts/northrend/storm_peaks.cpp index 42f74fa18f8..fcb76b7fbd0 100644 --- a/src/bindings/scripts/scripts/northrend/storm_peaks.cpp +++ b/src/bindings/scripts/scripts/northrend/storm_peaks.cpp @@ -115,6 +115,62 @@ bool GossipSelect_npc_frostborn_scout(Player* pPlayer, Creature* pCreature, uint return true; } +/*###### +## npc_thorim +######*/ + +#define GOSSIP_HN "Thorim?" +#define GOSSIP_SN1 "Can you tell me what became of Sif?" +#define GOSSIP_SN2 "He did more than that, Thorim. He controls Ulduar now." +#define GOSSIP_SN3 "It needn't end this way." + +enum +{ + QUEST_SIBLING_RIVALRY = 13064, + NPC_THORIM = 29445, + GOSSIP_TEXTID_THORIM1 = 13799, + GOSSIP_TEXTID_THORIM2 = 13801, + GOSSIP_TEXTID_THORIM3 = 13802, + GOSSIP_TEXTID_THORIM4 = 13803 +}; + +bool GossipHello_npc_thorim(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_SIBLING_RIVALRY) == QUEST_STATUS_INCOMPLETE) { + pPlayer->ADD_GOSSIP_ITEM(0, GOSSIP_HN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM1, pCreature->GetGUID()); + return true; + } + return false; +} + +bool GossipSelect_npc_thorim(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(0, GOSSIP_SN1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(0, GOSSIP_SN2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM3, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(0, GOSSIP_SN3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM4, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(QUEST_SIBLING_RIVALRY); + break; + } + return true; +} + void AddSC_storm_peaks() { Script* newscript; @@ -131,4 +187,10 @@ void AddSC_storm_peaks() newscript->pGossipHello = &GossipHello_npc_frostborn_scout; newscript->pGossipSelect = &GossipSelect_npc_frostborn_scout; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_thorim"; + newscript->pGossipHello = &GossipHello_npc_thorim; + newscript->pGossipSelect = &GossipSelect_npc_thorim; + newscript->RegisterSelf(); } |