Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
npc_taxi.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6/* ScriptData
7SDName: Npc_Taxi
8SD%Complete: 0%
9SDComment: To be used for taxi NPCs that are located globally.
10SDCategory: NPCs
11EndScriptData
12*/
13
14#include "ScriptMgr.h"
15#include "ScriptedCreature.h"
16#include "ScriptedGossip.h"
17#include "Player.h"
18#include "WorldSession.h"
19
20#define GOSSIP_SUSURRUS "I am ready."
21#define GOSSIP_NETHER_DRAKE "I'm ready to fly! Take me up, dragon!"
22#define GOSSIP_BRAZEN "I am ready to go to Durnholde Keep."
23#define GOSSIP_IRONWING "I'd like to take a flight around Stormwind Harbor."
24#define GOSSIP_DABIREE1 "Fly me to Murketh and Shaadraz Gateways"
25#define GOSSIP_DABIREE2 "Fly me to Shatter Point"
26#define GOSSIP_WINDBELLOW1 "Fly me to The Abyssal Shelf"
27#define GOSSIP_WINDBELLOW2 "Fly me to Honor Point"
28#define GOSSIP_BRACK1 "Fly me to Murketh and Shaadraz Gateways"
29#define GOSSIP_BRACK2 "Fly me to The Abyssal Shelf"
30#define GOSSIP_BRACK3 "Fly me to Spinebreaker Post"
31#define GOSSIP_IRENA "Fly me to Skettis please"
32#define GOSSIP_CLOUDBREAKER1 "Speaking of action, I've been ordered to undertake an air strike."
33#define GOSSIP_CLOUDBREAKER2 "I need to intercept the Dawnblade reinforcements."
34#define GOSSIP_DRAGONHAWK "<Ride the dragonhawk to Sun's Reach>"
35#define GOSSIP_VERONIA "Fly me to Manaforge Coruu please"
36#define GOSSIP_DEESAK "Fly me to Ogri'la please"
37#define GOSSIP_AFRASASTRASZ1 "I would like to take a flight to the ground, Lord Of Afrasastrasz."
38#define GOSSIP_AFRASASTRASZ2 "My Lord, I must go to the upper floor of the temple."
39#define GOSSIP_TARIOLSTRASZ1 "My Lord, I must go to the upper floor of the temple."
40#define GOSSIP_TARIOLSTRASZ2 "Can you spare a drake to travel to Lord Of Afrasastrasz, in the middle of the temple?"
41#define GOSSIP_TORASTRASZA1 "I would like to see Lord Of Afrasastrasz, in the middle of the temple."
42#define GOSSIP_TORASTRASZA2 "Yes, Please. I would like to return to the ground floor of the temple."
43#define GOSSIP_CRIMSONWING "<Ride the gryphons to Survey Alcaz Island>"
44#define GOSSIP_THRICESTAR1 "Do you think I could take a ride on one of those flying machines?"
45#define GOSSIP_THRICESTAR2 "Kara, I need to be flown out the Dens of Dying to find Bixie."
46#define GOSSIP_WILLIAMKEILAR1 "Take me to Northpass Tower."
47#define GOSSIP_WILLIAMKEILAR2 "Take me to Eastwall Tower."
48#define GOSSIP_WILLIAMKEILAR3 "Take me to Crown Guard Tower."
49
51{
52public:
53 npc_taxi() : CreatureScript("npc_taxi") { }
54
55 bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
56 {
57 if (creature->IsQuestGiver())
58 player->PrepareQuestMenu(creature->GetGUID());
59
60 switch (creature->GetEntry())
61 {
62 case 17435: // Azuremyst Isle - Susurrus
63 if (player->HasItemCount(23843, 1, true))
65 break;
66 case 20903: // Netherstorm - Protectorate Nether Drake
67 if (player->GetQuestStatus(10438) == QUEST_STATUS_INCOMPLETE && player->HasItemCount(29778))
69 break;
70 case 18725: // Old Hillsbrad Foothills - Brazen
72 break;
73 case 29154: // Stormwind City - Thargold Ironwing
75 break;
76 case 19409: // Hellfire Peninsula - Wing Commander Dabir'ee
77 //Mission: The Murketh and Shaadraz Gateways
78 if (player->GetQuestStatus(10146) == QUEST_STATUS_INCOMPLETE)
80
81 //Shatter Point
82 if (!player->GetQuestRewardStatus(10340))
84 break;
85 case 20235: // Hellfire Peninsula - Gryphoneer Windbellow
86 //Mission: The Abyssal Shelf || Return to the Abyssal Shelf
87 if (player->GetQuestStatus(10163) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(10346) == QUEST_STATUS_INCOMPLETE)
89
90 //Go to the Front
91 if (player->GetQuestStatus(10382) != QUEST_STATUS_NONE && !player->GetQuestRewardStatus(10382))
93 break;
94 case 19401: // Hellfire Peninsula - Wing Commander Brack
95 //Mission: The Murketh and Shaadraz Gateways
96 if (player->GetQuestStatus(10129) == QUEST_STATUS_INCOMPLETE)
98
99 //Mission: The Abyssal Shelf || Return to the Abyssal Shelf
100 if (player->GetQuestStatus(10162) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(10347) == QUEST_STATUS_INCOMPLETE)
102
103 //Spinebreaker Post
104 if (player->GetQuestStatus(10242) == QUEST_STATUS_COMPLETE)
106 break;
107 case 23413: // Blade's Edge Mountains - Skyguard Handler Irena
108 if (player->GetReputationRank(1031) >= REP_HONORED)
110 break;
111 case 25059: // Isle of Quel'Danas - Ayren Cloudbreaker
112 if (player->GetQuestStatus(11532) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(11533) == QUEST_STATUS_INCOMPLETE)
114
115 if (player->GetQuestStatus(11542) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(11543) == QUEST_STATUS_INCOMPLETE)
117 break;
118 case 25236: // Isle of Quel'Danas - Unrestrained Dragonhawk
119 if (player->GetQuestStatus(11542) == QUEST_STATUS_COMPLETE || player->GetQuestStatus(11543) == QUEST_STATUS_COMPLETE)
121 break;
122 case 20162: // Netherstorm - Veronia
123 //Behind Enemy Lines
124 if (player->GetQuestStatus(10652) != QUEST_STATUS_REWARDED)
126 break;
127 case 23415: // Terokkar Forest - Skyguard Handler Deesak
128 if (player->GetReputationRank(1031) >= REP_HONORED)
130 break;
131 case 27575: // Dragonblight - Lord Afrasastrasz
132 // middle -> ground
134 // middle -> top
136 break;
137 case 26443: // Dragonblight - Tariolstrasz //need to check if quests are required before gossip available (12123, 12124)
138 // ground -> top
140 // ground -> middle
142 break;
143 case 26949: // Dragonblight - Torastrasza
144 // top -> middle
146 // top -> ground
148 break;
149 case 23704: // Dustwallow Marsh - Cassa Crimsonwing
150 if (player->GetQuestStatus(11142) == QUEST_STATUS_INCOMPLETE)
152 break;
153 case 26602:
154 if (creature->IsTaxi())
156
157 if (player->GetQuestStatus(11692) == QUEST_STATUS_COMPLETE)
159 break;
160 case 17209:
161 player->SetTaxiCheater(true);
165 break;
166 }
167
168 player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
169 return true;
170 }
171
172 bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
173 {
174 player->PlayerTalkClass->ClearMenus();
175 switch (action)
176 {
178 //spellId is correct, however it gives flight a somewhat funny effect //TaxiPath 506.
179 player->CLOSE_GOSSIP_MENU();
180 player->CastSpell(player, 32474, true);
181 break;
182 case GOSSIP_ACTION_INFO_DEF + 1:
183 player->CLOSE_GOSSIP_MENU();
184 player->ActivateTaxiPathTo(627); //TaxiPath 627 (possibly 627+628(152->153->154->155))
185 break;
186 case GOSSIP_ACTION_INFO_DEF + 2:
187 if (!player->HasItemCount(25853))
188 player->SEND_GOSSIP_MENU(9780, creature->GetGUID());
189 else
190 {
191 player->CLOSE_GOSSIP_MENU();
192 player->ActivateTaxiPathTo(534); //TaxiPath 534
193 }
194 break;
195 case GOSSIP_ACTION_INFO_DEF + 3:
196 player->CLOSE_GOSSIP_MENU();
197 player->CastSpell(player, 53335, true); //TaxiPath 1041 (Stormwind Harbor)
198 break;
199 case GOSSIP_ACTION_INFO_DEF + 4:
200 player->CLOSE_GOSSIP_MENU();
201 player->CastSpell(player, 33768, true); //TaxiPath 585 (Gateways Murket and Shaadraz)
202 break;
203 case GOSSIP_ACTION_INFO_DEF + 5:
204 player->CLOSE_GOSSIP_MENU();
205 player->CastSpell(player, 35069, true); //TaxiPath 612 (Taxi - Hellfire Peninsula - Expedition Point to Shatter Point)
206 break;
207 case GOSSIP_ACTION_INFO_DEF + 6:
208 player->CLOSE_GOSSIP_MENU();
209 player->CastSpell(player, 33899, true); //TaxiPath 589 (Aerial Assault Flight (Alliance))
210 break;
211 case GOSSIP_ACTION_INFO_DEF + 7:
212 player->CLOSE_GOSSIP_MENU();
213 player->CastSpell(player, 35065, true); //TaxiPath 607 (Taxi - Hellfire Peninsula - Shatter Point to Beach Head)
214 break;
215 case GOSSIP_ACTION_INFO_DEF + 8:
216 player->CLOSE_GOSSIP_MENU();
217 player->CastSpell(player, 33659, true); //TaxiPath 584 (Gateways Murket and Shaadraz)
218 break;
219 case GOSSIP_ACTION_INFO_DEF + 9:
220 player->CLOSE_GOSSIP_MENU();
221 player->CastSpell(player, 33825, true); //TaxiPath 587 (Aerial Assault Flight (Horde))
222 break;
223 case GOSSIP_ACTION_INFO_DEF + 10:
224 player->CLOSE_GOSSIP_MENU();
225 player->CastSpell(player, 34578, true); //TaxiPath 604 (Taxi - Reaver's Fall to Spinebreaker Ridge)
226 break;
227 case GOSSIP_ACTION_INFO_DEF + 11:
228 player->CLOSE_GOSSIP_MENU();
229 player->CastSpell(player, 41278, true); //TaxiPath 706
230 break;
231 case GOSSIP_ACTION_INFO_DEF + 12:
232 player->CLOSE_GOSSIP_MENU();
233 player->CastSpell(player, 45071, true); //TaxiPath 779
234 break;
235 case GOSSIP_ACTION_INFO_DEF + 13:
236 player->CLOSE_GOSSIP_MENU();
237 player->CastSpell(player, 45113, true); //TaxiPath 784
238 break;
239 case GOSSIP_ACTION_INFO_DEF + 14:
240 player->CLOSE_GOSSIP_MENU();
241 player->CastSpell(player, 45353, true); //TaxiPath 788
242 break;
243 case GOSSIP_ACTION_INFO_DEF + 15:
244 player->CLOSE_GOSSIP_MENU();
245 player->CastSpell(player, 34905, true); //TaxiPath 606
246 break;
247 case GOSSIP_ACTION_INFO_DEF + 16:
248 player->CLOSE_GOSSIP_MENU();
249 player->CastSpell(player, 41279, true); //TaxiPath 705 (Taxi - Skettis to Skyguard Outpost)
250 break;
251 case GOSSIP_ACTION_INFO_DEF + 17:
252 player->CLOSE_GOSSIP_MENU();
253 player->ActivateTaxiPathTo(882);
254 break;
255 case GOSSIP_ACTION_INFO_DEF + 18:
256 player->CLOSE_GOSSIP_MENU();
257 player->ActivateTaxiPathTo(881);
258 break;
259 case GOSSIP_ACTION_INFO_DEF + 19:
260 player->CLOSE_GOSSIP_MENU();
261 player->ActivateTaxiPathTo(878);
262 break;
263 case GOSSIP_ACTION_INFO_DEF + 20:
264 player->CLOSE_GOSSIP_MENU();
265 player->ActivateTaxiPathTo(883);
266 break;
267 case GOSSIP_ACTION_INFO_DEF + 21:
268 player->CLOSE_GOSSIP_MENU();
269 player->ActivateTaxiPathTo(880);
270 break;
271 case GOSSIP_ACTION_INFO_DEF + 22:
272 player->CLOSE_GOSSIP_MENU();
273 player->ActivateTaxiPathTo(879);
274 break;
275 case GOSSIP_ACTION_INFO_DEF + 23:
276 player->CLOSE_GOSSIP_MENU();
277 player->CastSpell(player, 43074, true); //TaxiPath 736
278 break;
279 case GOSSIP_ACTION_INFO_DEF + 24:
280 player->CLOSE_GOSSIP_MENU();
281 //player->ActivateTaxiPathTo(738);
282 player->CastSpell(player, 43136, false);
283 break;
284 case GOSSIP_ACTION_INFO_DEF + 25:
285 player->CLOSE_GOSSIP_MENU();
286 player->CastSpell(player, 42295, true);
287 break;
288 case GOSSIP_ACTION_INFO_DEF + 26:
289 player->GetSession()->SendTaxiMenu(creature);
290 break;
291 case GOSSIP_ACTION_INFO_DEF + 27:
292 player->CLOSE_GOSSIP_MENU();
293 player->CastSpell(player, 51446, false);
294 break;
295 case GOSSIP_ACTION_INFO_DEF + 28:
296 player->CLOSE_GOSSIP_MENU();
297 player->ActivateTaxiPathTo(494);
298 break;
299 case GOSSIP_ACTION_INFO_DEF + 29:
300 player->CLOSE_GOSSIP_MENU();
301 player->ActivateTaxiPathTo(495);
302 break;
303 case GOSSIP_ACTION_INFO_DEF + 30:
304 player->CLOSE_GOSSIP_MENU();
305 player->ActivateTaxiPathTo(496);
306 break;
307 }
308
309 return true;
310 }
311};
312
314{
315 new npc_taxi;
316}
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ GOSSIP_ICON_CHAT
Definition GossipDef.h:46
@ GOSSIP_ICON_TAXI
Definition GossipDef.h:48
@ QUEST_STATUS_REWARDED
Definition QuestDef.h:92
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:89
@ QUEST_STATUS_NONE
Definition QuestDef.h:86
@ QUEST_STATUS_COMPLETE
Definition QuestDef.h:87
@ GOSSIP_SENDER_MAIN
@ GOSSIP_ACTION_INFO_DEF
@ REP_HONORED
CreatureScript(const char *name)
bool OnGossipSelect(Player *player, Creature *creature, uint32, uint32 action) OVERRIDE
Definition npc_taxi.cpp:172
bool OnGossipHello(Player *player, Creature *creature) OVERRIDE
Definition npc_taxi.cpp:55
#define GOSSIP_IRONWING
Definition npc_taxi.cpp:23
#define GOSSIP_BRACK2
Definition npc_taxi.cpp:29
#define GOSSIP_WILLIAMKEILAR3
Definition npc_taxi.cpp:48
#define GOSSIP_DABIREE1
Definition npc_taxi.cpp:24
#define GOSSIP_TARIOLSTRASZ2
Definition npc_taxi.cpp:40
void AddSC_npc_taxi()
Definition npc_taxi.cpp:313
#define GOSSIP_BRAZEN
Definition npc_taxi.cpp:22
#define GOSSIP_SUSURRUS
Definition npc_taxi.cpp:20
#define GOSSIP_BRACK1
Definition npc_taxi.cpp:28
#define GOSSIP_DABIREE2
Definition npc_taxi.cpp:25
#define GOSSIP_THRICESTAR1
Definition npc_taxi.cpp:44
#define GOSSIP_DRAGONHAWK
Definition npc_taxi.cpp:34
#define GOSSIP_AFRASASTRASZ1
Definition npc_taxi.cpp:37
#define GOSSIP_BRACK3
Definition npc_taxi.cpp:30
#define GOSSIP_CLOUDBREAKER2
Definition npc_taxi.cpp:33
#define GOSSIP_TARIOLSTRASZ1
Definition npc_taxi.cpp:39
#define GOSSIP_WINDBELLOW1
Definition npc_taxi.cpp:26
#define GOSSIP_IRENA
Definition npc_taxi.cpp:31
#define GOSSIP_CLOUDBREAKER1
Definition npc_taxi.cpp:32
#define GOSSIP_WILLIAMKEILAR2
Definition npc_taxi.cpp:47
#define GOSSIP_AFRASASTRASZ2
Definition npc_taxi.cpp:38
#define GOSSIP_DEESAK
Definition npc_taxi.cpp:36
#define GOSSIP_TORASTRASZA2
Definition npc_taxi.cpp:42
#define GOSSIP_VERONIA
Definition npc_taxi.cpp:35
#define GOSSIP_WILLIAMKEILAR1
Definition npc_taxi.cpp:46
#define GOSSIP_WINDBELLOW2
Definition npc_taxi.cpp:27
#define GOSSIP_TORASTRASZA1
Definition npc_taxi.cpp:41
#define GOSSIP_CRIMSONWING
Definition npc_taxi.cpp:43
#define GOSSIP_THRICESTAR2
Definition npc_taxi.cpp:45
#define GOSSIP_NETHER_DRAKE
Definition npc_taxi.cpp:21