diff options
| -rw-r--r-- | sql/FULL/world_scripts_full.sql | 1 | ||||
| -rw-r--r-- | sql/updates/5305_world_scripts.sql | 2 | ||||
| -rw-r--r-- | src/bindings/scripts/scripts/northrend/borean_tundra.cpp | 39 |
3 files changed, 42 insertions, 0 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index 8a4976fceda..0e23b8a52da 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -314,6 +314,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_surristrasz' WHERE `entry`=2479 UPDATE `creature_template` SET `ScriptName`='npc_tiare' WHERE `entry`=30051; UPDATE `creature_template` SET `ScriptName`='npc_sinkhole_kill_credit' WHERE `entry` IN (26248,26249); UPDATE `creature_template` SET `ScriptName`='npc_khunok_the_behemoth' WHERE `entry`=25862; +UPDATE `creature_template` SET `ScriptName`='npc_keristrasza' WHERE `entry`=26206; /* BURNING STEPPES */ UPDATE `creature_template` SET `ScriptName`='npc_ragged_john' WHERE `entry`=9563; diff --git a/sql/updates/5305_world_scripts.sql b/sql/updates/5305_world_scripts.sql new file mode 100644 index 00000000000..fae920db622 --- /dev/null +++ b/sql/updates/5305_world_scripts.sql @@ -0,0 +1,2 @@ + +UPDATE `creature_template` SET `ScriptName`='npc_keristrasza' WHERE `entry`=26206; diff --git a/src/bindings/scripts/scripts/northrend/borean_tundra.cpp b/src/bindings/scripts/scripts/northrend/borean_tundra.cpp index 08b02bea541..ed4299c0738 100644 --- a/src/bindings/scripts/scripts/northrend/borean_tundra.cpp +++ b/src/bindings/scripts/scripts/northrend/borean_tundra.cpp @@ -322,6 +322,39 @@ CreatureAI* GetAI_npc_khunok_the_behemoth(Creature* pCreature) return new npc_khunok_the_behemothAI(pCreature); } +/*###### +## npc_keristrasza +######*/ + +enum +{ + SPELL_TELEPORT_TO_SARAGOSA = 46772 +}; + +bool GossipHello_npc_keristrasza(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(11957) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am prepared to face Saragosa!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_keristrasza(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_TO_SARAGOSA, true); + } + + return true; +} + void AddSC_borean_tundra() { Script *newscript; @@ -353,4 +386,10 @@ void AddSC_borean_tundra() newscript->Name="npc_khunok_the_behemoth"; newscript->GetAI = &GetAI_npc_khunok_the_behemoth; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_keristrasza"; + newscript->pGossipHello = &GossipHello_npc_keristrasza; + newscript->pGossipSelect = &GossipSelect_npc_keristrasza; + newscript->RegisterSelf(); } |
