diff options
| author | maximius <none@none> | 2009-08-22 18:46:04 -0700 |
|---|---|---|
| committer | maximius <none@none> | 2009-08-22 18:46:04 -0700 |
| commit | ecf8d4cb527d88d9d26808ebbd118dbe4107e956 (patch) | |
| tree | 2514d00a1963a3ea0814498a6bc3468dd6341f48 /src | |
| parent | 0a45059351ff8982e0c274a10f870f8e443d2e25 (diff) | |
*Keristrasza - Teleport players to Saragosa's Landing script - by Oculus
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/bindings/scripts/scripts/northrend/borean_tundra.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
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(); } |
