*Keristrasza - Teleport players to Saragosa's Landing script - by Oculus

--HG--
branch : trunk
This commit is contained in:
maximius
2009-08-22 18:46:04 -07:00
parent 0a45059351
commit ecf8d4cb52
3 changed files with 42 additions and 0 deletions

View File

@@ -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;

View File

@@ -0,0 +1,2 @@
UPDATE `creature_template` SET `ScriptName`='npc_keristrasza' WHERE `entry`=26206;

View File

@@ -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();
}