Files
TrinityCore/src/scripts/custom/npc_acherus_taxi.cpp
Rat 0cc053ea4d *Integrate Script system to Core
-added ScriptMgr for loading scripts
-removed bindings
-moved script system to src/game
-moved scripts to src/scripts
-VC project files updated
-cmakes updated (not 100% done yet)

NOTE to Devs:
-file locations changed
-precompiled renamed to ScriptedPch
-ecsort_ai renamed to ScriptedEscortAI
-follower_ai renamed to ScriptedFollowerAI
-guard_ai renamed to ScriptedGuardAI
-simple_ai renamed to ScriptedSimpleAI
-sc_creature renamed to ScriptedCreature
-sc_gossip renamed to ScriptedGossip
-sc_instance  renamed to ScriptedInstance

*use the new headers in scripts, thank you

NOTE to ALL:
cmake not fully tested, please report any errors with it
could make creashes, incompability
USE AT YOUR OWN RISK before further tests!!

--HG--
branch : trunk
2010-01-19 11:36:05 +01:00

36 lines
1.0 KiB
C++

#include "ScriptedPch.h"
#include "WorldPacket.h"
#define GOSSIP_FLIGHT "I need a ride"
bool GossipHello_npc_acherus_taxi(Player *pPlayer, Creature *pCreature)
{
pPlayer->SetTaxiCheater(true);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
pPlayer->SEND_GOSSIP_MENU(9978, pCreature->GetGUID());
return true;
}
bool GossipSelect_npc_acherus_taxi(Player *pPlayer, Creature *pCreature, uint32 uiSender, uint32 uiAction)
{
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
{
if (pPlayer->GetPositionZ() >= 316)
pPlayer->GetSession()->SendDoFlight(24446, 1053);
else
pPlayer->GetSession()->SendDoFlight(24446, 1054);
}
return true;
}
void AddSC_npc_acherus_taxi()
{
Script *newscript;
newscript = new Script;
newscript->Name = "npc_acherus_taxi";
newscript->pGossipHello = &GossipHello_npc_acherus_taxi;
newscript->pGossipSelect = &GossipSelect_npc_acherus_taxi;
newscript->RegisterSelf();
}