AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
npc_taxi Class Reference
Inheritance diagram for npc_taxi:
CreatureScript ScriptObject UpdatableScript< Creature >

Public Member Functions

 npc_taxi ()
 
bool OnGossipHello (Player *player, Creature *creature) override
 
bool OnGossipSelect (Player *player, Creature *, uint32, uint32 action) override
 
- Public Member Functions inherited from CreatureScript
bool IsDatabaseBound () const override
 
virtual bool OnGossipHello (Player *, Creature *)
 
virtual bool OnGossipSelect (Player *, Creature *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, Creature *, uint32, uint32, const char *)
 
virtual bool OnQuestAccept (Player *, Creature *, Quest const *)
 
virtual bool OnQuestSelect (Player *, Creature *, Quest const *)
 
virtual bool OnQuestComplete (Player *, Creature *, Quest const *)
 
virtual bool OnQuestReward (Player *, Creature *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, Creature *)
 
virtual CreatureAIGetAI (Creature *) const
 
virtual void OnFfaPvpStateUpdate (Creature *, bool)
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
- Public Member Functions inherited from UpdatableScript< Creature >
virtual void OnUpdate (Creature *, uint32)
 

Additional Inherited Members

- Protected Member Functions inherited from CreatureScript
 CreatureScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()=default
 
- Protected Member Functions inherited from UpdatableScript< Creature >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_taxi()

npc_taxi::npc_taxi ( )
inline
58: CreatureScript("npc_taxi") { }
Definition: ScriptMgr.h:719

Member Function Documentation

◆ OnGossipHello()

bool npc_taxi::OnGossipHello ( Player player,
Creature creature 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

61 {
62 if (creature->IsQuestGiver())
63 player->PrepareQuestMenu(creature->GetGUID());
64
65 switch (creature->GetEntry())
66 {
67 case 20903: // Netherstorm - Protectorate Nether Drake
68 if (player->GetQuestStatus(10438) == QUEST_STATUS_INCOMPLETE && player->HasItemCount(29778))
70 break;
71 case 29154: // Stormwind City - Thargold Ironwing
73 break;
74 case 19409: // Hellfire Peninsula - Wing Commander Dabir'ee
75 //Mission: The Murketh and Shaadraz Gateways
76 if (player->GetQuestStatus(10146) == QUEST_STATUS_INCOMPLETE)
78
79 //Shatter Point
80 if (!player->GetQuestRewardStatus(10340))
82 break;
83 case 19401: // Hellfire Peninsula - Wing Commander Brack
84 //Mission: The Murketh and Shaadraz Gateways
85 if (player->GetQuestStatus(10129) == QUEST_STATUS_INCOMPLETE)
87
88 //Mission: The Abyssal Shelf || Return to the Abyssal Shelf
89 if (player->GetQuestStatus(10162) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(10347) == QUEST_STATUS_INCOMPLETE)
91
92 //Spinebreaker Post
93 if (player->GetQuestStatus(10242) == QUEST_STATUS_COMPLETE)
95 break;
96 case 23413: // Blade's Edge Mountains - Skyguard Handler Irena
97 if (player->GetReputationRank(1031) >= REP_HONORED)
99 break;
100 case 25059: // Isle of Quel'Danas - Ayren Cloudbreaker
101 if (player->GetQuestStatus(11532) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(11533) == QUEST_STATUS_INCOMPLETE)
103
104 if (player->GetQuestStatus(11542) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(11543) == QUEST_STATUS_INCOMPLETE)
106 break;
107 case 25236: // Isle of Quel'Danas - Unrestrained Dragonhawk
108 if (player->GetQuestStatus(11542) == QUEST_STATUS_COMPLETE || player->GetQuestStatus(11543) == QUEST_STATUS_COMPLETE)
110 break;
111 case 20162: // Netherstorm - Veronia
112 //Behind Enemy Lines
113 if (player->GetQuestStatus(10652) != QUEST_STATUS_REWARDED)
115 break;
116 case 23415: // Terokkar Forest - Skyguard Handler Deesak
117 if (player->GetReputationRank(1031) >= REP_HONORED)
119 break;
120 case 27575: // Dragonblight - Lord Afrasastrasz
121 // middle -> ground
123 // middle -> top
125 break;
126 case 26443: // Dragonblight - Tariolstrasz //need to check if quests are required before gossip available (12123, 12124)
127 // ground -> top
129 // ground -> middle
131 break;
132 case 26949: // Dragonblight - Torastrasza
133 // top -> middle
135 // top -> ground
137 break;
138 case 23704: // Dustwallow Marsh - Cassa Crimsonwing
139 if (player->GetQuestStatus(11142) == QUEST_STATUS_INCOMPLETE)
141 break;
142 case 17209:
146 break;
147 }
148
149 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
150 return true;
151 }
void SendGossipMenuFor(Player *player, uint32 npcTextID, ObjectGuid const guid)
Definition: ScriptedGossip.cpp:45
void AddGossipItemFor(Player *player, uint32 icon, std::string const &text, uint32 sender, uint32 action)
Definition: ScriptedGossip.cpp:28
@ GOSSIP_SENDER_MAIN
Definition: ScriptedGossip.h:70
@ GOSSIP_ACTION_INFO_DEF
Definition: ScriptedGossip.h:68
@ GOSSIP_ICON_CHAT
Definition: GossipDef.h:60
@ QUEST_STATUS_REWARDED
Definition: QuestDef.h:106
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:103
@ QUEST_STATUS_COMPLETE
Definition: QuestDef.h:101
#define GOSSIP_IRONWING
Definition: npc_taxi.cpp:32
#define GOSSIP_BRACK2
Definition: npc_taxi.cpp:36
#define GOSSIP_WILLIAMKEILAR3
Definition: npc_taxi.cpp:53
#define GOSSIP_DABIREE1
Definition: npc_taxi.cpp:33
#define GOSSIP_TARIOLSTRASZ2
Definition: npc_taxi.cpp:47
#define GOSSIP_BRACK1
Definition: npc_taxi.cpp:35
#define GOSSIP_DABIREE2
Definition: npc_taxi.cpp:34
#define GOSSIP_DRAGONHAWK
Definition: npc_taxi.cpp:41
#define GOSSIP_AFRASASTRASZ1
Definition: npc_taxi.cpp:44
#define GOSSIP_BRACK3
Definition: npc_taxi.cpp:37
#define GOSSIP_CLOUDBREAKER2
Definition: npc_taxi.cpp:40
#define GOSSIP_TARIOLSTRASZ1
Definition: npc_taxi.cpp:46
#define GOSSIP_IRENA
Definition: npc_taxi.cpp:38
#define GOSSIP_CLOUDBREAKER1
Definition: npc_taxi.cpp:39
#define GOSSIP_WILLIAMKEILAR2
Definition: npc_taxi.cpp:52
#define GOSSIP_AFRASASTRASZ2
Definition: npc_taxi.cpp:45
#define GOSSIP_DEESAK
Definition: npc_taxi.cpp:43
#define GOSSIP_TORASTRASZA2
Definition: npc_taxi.cpp:49
#define GOSSIP_VERONIA
Definition: npc_taxi.cpp:42
#define GOSSIP_WILLIAMKEILAR1
Definition: npc_taxi.cpp:51
#define GOSSIP_TORASTRASZA1
Definition: npc_taxi.cpp:48
#define GOSSIP_CRIMSONWING
Definition: npc_taxi.cpp:50
#define GOSSIP_NETHER_DRAKE
Definition: npc_taxi.cpp:31
@ REP_HONORED
Definition: SharedDefines.h:157
uint32 GetEntry() const
Definition: Object.h:109
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
bool GetQuestRewardStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1399
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
Definition: PlayerStorage.cpp:686
void PrepareQuestMenu(ObjectGuid guid)
Definition: PlayerQuest.cpp:38
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1414
ReputationRank GetReputationRank(uint32 faction_id) const
Definition: Player.cpp:5763
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: PlayerGossip.cpp:405
bool IsQuestGiver() const
Definition: Unit.h:1653

References AddGossipItemFor(), Object::GetEntry(), Player::GetGossipTextId(), Object::GetGUID(), Player::GetQuestRewardStatus(), Player::GetQuestStatus(), Player::GetReputationRank(), GOSSIP_ACTION_INFO_DEF, GOSSIP_AFRASASTRASZ1, GOSSIP_AFRASASTRASZ2, GOSSIP_BRACK1, GOSSIP_BRACK2, GOSSIP_BRACK3, GOSSIP_CLOUDBREAKER1, GOSSIP_CLOUDBREAKER2, GOSSIP_CRIMSONWING, GOSSIP_DABIREE1, GOSSIP_DABIREE2, GOSSIP_DEESAK, GOSSIP_DRAGONHAWK, GOSSIP_ICON_CHAT, GOSSIP_IRENA, GOSSIP_IRONWING, GOSSIP_NETHER_DRAKE, GOSSIP_SENDER_MAIN, GOSSIP_TARIOLSTRASZ1, GOSSIP_TARIOLSTRASZ2, GOSSIP_TORASTRASZA1, GOSSIP_TORASTRASZA2, GOSSIP_VERONIA, GOSSIP_WILLIAMKEILAR1, GOSSIP_WILLIAMKEILAR2, GOSSIP_WILLIAMKEILAR3, Player::HasItemCount(), Unit::IsQuestGiver(), Player::PrepareQuestMenu(), QUEST_STATUS_COMPLETE, QUEST_STATUS_INCOMPLETE, QUEST_STATUS_REWARDED, REP_HONORED, and SendGossipMenuFor().

◆ OnGossipSelect()

bool npc_taxi::OnGossipSelect ( Player player,
Creature ,
uint32  ,
uint32  action 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

154 {
155 ClearGossipMenuFor(player);
156 switch (action)
157 {
158 case GOSSIP_ACTION_INFO_DEF + 1:
159 CloseGossipMenuFor(player);
160 player->ActivateTaxiPathTo(627); //TaxiPath 627 (possibly 627+628(152->153->154->155))
161 break;
162 case GOSSIP_ACTION_INFO_DEF + 3:
163 CloseGossipMenuFor(player);
164 player->CastSpell(player, 53335, true); //TaxiPath 1041 (Stormwind Harbor)
165 break;
166 case GOSSIP_ACTION_INFO_DEF + 4:
167 CloseGossipMenuFor(player);
168 player->CastSpell(player, 33768, true); //TaxiPath 585 (Gateways Murket and Shaadraz)
169 break;
170 case GOSSIP_ACTION_INFO_DEF + 5:
171 CloseGossipMenuFor(player);
172 player->CastSpell(player, 35069, true); //TaxiPath 612 (Taxi - Hellfire Peninsula - Expedition Point to Shatter Point)
173 break;
174 case GOSSIP_ACTION_INFO_DEF + 8:
175 CloseGossipMenuFor(player);
176 player->CastSpell(player, 33659, true); //TaxiPath 584 (Gateways Murket and Shaadraz)
177 break;
178 case GOSSIP_ACTION_INFO_DEF + 9:
179 CloseGossipMenuFor(player);
180 player->CastSpell(player, 33825, true); //TaxiPath 587 (Aerial Assault Flight (Horde))
181 break;
182 case GOSSIP_ACTION_INFO_DEF + 10:
183 CloseGossipMenuFor(player);
184 player->CastSpell(player, 34578, true); //TaxiPath 604 (Taxi - Reaver's Fall to Spinebreaker Ridge)
185 break;
186 case GOSSIP_ACTION_INFO_DEF + 11:
187 CloseGossipMenuFor(player);
188 player->CastSpell(player, 41278, true); //TaxiPath 706
189 break;
190 case GOSSIP_ACTION_INFO_DEF + 12:
191 CloseGossipMenuFor(player);
192 player->CastSpell(player, 45071, true); //TaxiPath 779
193 break;
194 case GOSSIP_ACTION_INFO_DEF + 13:
195 CloseGossipMenuFor(player);
196 player->CastSpell(player, 45113, true); //TaxiPath 784
197 break;
198 case GOSSIP_ACTION_INFO_DEF + 14:
199 CloseGossipMenuFor(player);
200 player->CastSpell(player, 45353, true); //TaxiPath 788
201 break;
202 case GOSSIP_ACTION_INFO_DEF + 15:
203 CloseGossipMenuFor(player);
204 player->CastSpell(player, 34905, true); //TaxiPath 606
205 break;
206 case GOSSIP_ACTION_INFO_DEF + 16:
207 CloseGossipMenuFor(player);
208 player->CastSpell(player, 41279, true); //TaxiPath 705 (Taxi - Skettis to Skyguard Outpost)
209 break;
210 case GOSSIP_ACTION_INFO_DEF + 17:
211 CloseGossipMenuFor(player);
212 player->ActivateTaxiPathTo(882);
213 break;
214 case GOSSIP_ACTION_INFO_DEF + 18:
215 CloseGossipMenuFor(player);
216 player->ActivateTaxiPathTo(881);
217 break;
218 case GOSSIP_ACTION_INFO_DEF + 19:
219 CloseGossipMenuFor(player);
220 player->ActivateTaxiPathTo(878);
221 break;
222 case GOSSIP_ACTION_INFO_DEF + 20:
223 CloseGossipMenuFor(player);
224 player->ActivateTaxiPathTo(883);
225 break;
226 case GOSSIP_ACTION_INFO_DEF + 21:
227 CloseGossipMenuFor(player);
228 player->ActivateTaxiPathTo(880);
229 break;
230 case GOSSIP_ACTION_INFO_DEF + 22:
231 CloseGossipMenuFor(player);
232 player->ActivateTaxiPathTo(879);
233 break;
234 case GOSSIP_ACTION_INFO_DEF + 23:
235 CloseGossipMenuFor(player);
236 player->CastSpell(player, 43074, true); //TaxiPath 736
237 break;
238 case GOSSIP_ACTION_INFO_DEF + 24:
239 CloseGossipMenuFor(player);
240 //player->ActivateTaxiPathTo(738);
241 player->CastSpell(player, 43136, false);
242 break;
243 case GOSSIP_ACTION_INFO_DEF + 25:
244 CloseGossipMenuFor(player);
245 player->CastSpell(player, 42295, true);
246 break;
247 case GOSSIP_ACTION_INFO_DEF + 26:
248 CloseGossipMenuFor(player);
249 player->ActivateTaxiPathTo(494);
250 break;
251 case GOSSIP_ACTION_INFO_DEF + 27:
252 CloseGossipMenuFor(player);
253 player->ActivateTaxiPathTo(495);
254 break;
255 case GOSSIP_ACTION_INFO_DEF + 28:
256 CloseGossipMenuFor(player);
257 player->ActivateTaxiPathTo(496);
258 break;
259 }
260
261 return true;
262 }
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
bool ActivateTaxiPathTo(std::vector< uint32 > const &nodes, Creature *npc=nullptr, uint32 spellid=1)
Definition: Player.cpp:10128
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1169

References Player::ActivateTaxiPathTo(), Unit::CastSpell(), ClearGossipMenuFor(), CloseGossipMenuFor(), and GOSSIP_ACTION_INFO_DEF.