Convert scripts in the Custom directory to new format

--HG--
branch : trunk
This commit is contained in:
silinoron
2010-08-06 17:23:01 -07:00
parent f73e952de3
commit 5e250b1df4
2 changed files with 75 additions and 91 deletions
@@ -20,7 +20,12 @@
#define GOSSIP_FLIGHT "I need a ride"
bool GossipHello_npc_acherus_taxi(Player *pPlayer, Creature *pCreature)
class npc_acherus_taxi : public CreatureScript
{
public:
npc_acherus_taxi() : CreatureScript("npc_acherus_taxi") { }
bool OnGossipHello(Player *pPlayer, Creature *pCreature)
{
pPlayer->SetTaxiCheater(true);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
@@ -28,7 +33,7 @@ bool GossipHello_npc_acherus_taxi(Player *pPlayer, Creature *pCreature)
return true;
}
bool GossipSelect_npc_acherus_taxi(Player *pPlayer, Creature * /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player *pPlayer, Creature * /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction)
{
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
{
@@ -39,14 +44,9 @@ bool GossipSelect_npc_acherus_taxi(Player *pPlayer, Creature * /*pCreature*/, ui
}
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();
new npc_acherus_taxi;
}
@@ -25,7 +25,12 @@
#define GOSSIP_BOTTOM "Yes, Please. I would like to return to the ground floor of the temple."
#define GOSSIP_ONEDOWN "I would like to see Lord Afrasastrasz, in the middle of the temple."
bool GossipHello_npc_wyrmresttempel_middle_taxi(Player* pPlayer, Creature* pCreature)
class npc_wyrmrest_temple_middle_taxi : public CreatureScript
{
public:
npc_wyrmrest_temple_middle_taxi() : CreatureScript("npc_wyrmresttempelmiddle_taxi") { }
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
{
pPlayer->SetTaxiCheater(true);
@@ -36,22 +41,23 @@ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DOWN, GOSSIP_SENDER_MAIN, GOSS
return true;
}
bool GossipSelect_npc_wyrmresttempel_middle_taxi(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction)
{
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
{
pPlayer->GetSession()->SendDoFlight(6376, 881);
}
if (uiAction == GOSSIP_ACTION_INFO_DEF + 2)
{
pPlayer->GetSession()->SendDoFlight(6376, 882);
}
return true;
}
};
bool GossipHello_npc_wyrmresttempel_bottom_taxi(Player* pPlayer, Creature* pCreature)
class npc_wyrmrest_temple_bottom_taxi : public CreatureScript
{
public:
npc_wyrmrest_temple_bottom_taxi() : CreatureScript("npc_wyrmresttempelbottom_taxi") { }
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
{
pPlayer->SetTaxiCheater(true);
@@ -62,22 +68,22 @@ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MIDDLE, GOSSIP_SENDER_MAIN, GO
return true;
}
bool GossipSelect_npc_wyrmresttempel_bottom_taxi(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction)
{
if (uiAction == GOSSIP_ACTION_INFO_DEF + 4)
{
pPlayer->GetSession()->SendDoFlight(6376, 878);
}
if (uiAction == GOSSIP_ACTION_INFO_DEF + 3)
{
pPlayer->GetSession()->SendDoFlight(6376, 883);
}
return true;
}
};
bool GossipHello_npc_wyrmresttempel_top_taxi(Player* pPlayer, Creature* pCreature)
class npc_wyrmrest_temple_top_taxi : public CreatureScript
{
public:
npc_wyrmrest_temple_top_taxi() : CreatureScript("npc_wyrmresttempeltop_taxi") { }
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
{
pPlayer->SetTaxiCheater(true);
@@ -88,42 +94,20 @@ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ONEDOWN, GOSSIP_SENDER_MAIN, G
return true;
}
bool GossipSelect_npc_wyrmresttempel_top_taxi(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction)
{
if (uiAction == GOSSIP_ACTION_INFO_DEF + 5)
{
pPlayer->GetSession()->SendDoFlight(6376, 879);
}
if (uiAction == GOSSIP_ACTION_INFO_DEF + 6)
{
pPlayer->GetSession()->SendDoFlight(6376, 880);
}
return true;
}
};
void AddSC_npc_wyrmresttempel_taxi()
{
Script *newscript;
newscript = new Script;
newscript->Name = "npc_wyrmresttempelmiddle_taxi";
newscript->pGossipHello = &GossipHello_npc_wyrmresttempel_middle_taxi;
newscript->pGossipSelect = &GossipSelect_npc_wyrmresttempel_middle_taxi;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "npc_wyrmresttempelbottom_taxi";
newscript->pGossipHello = &GossipHello_npc_wyrmresttempel_bottom_taxi;
newscript->pGossipSelect = &GossipSelect_npc_wyrmresttempel_bottom_taxi;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "npc_wyrmresttempeltop_taxi";
newscript->pGossipHello = &GossipHello_npc_wyrmresttempel_top_taxi;
newscript->pGossipSelect = &GossipSelect_npc_wyrmresttempel_top_taxi;
newscript->RegisterSelf();
new npc_wyrmrest_temple_middle_taxi;
new npc_wyrmrest_temple_bottom_taxi;
new npc_wyrmrest_temple_top_taxi;
}