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
73: CreatureScript("npc_taxi") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

76 {
77 if (creature->IsQuestGiver())
78 player->PrepareQuestMenu(creature->GetGUID());
79
80 uint32 gossipmenuid = 0;
81 gossipmenuid = creature->GetCreatureTemplate()->GossipMenuId;
82
83 switch (creature->GetEntry())
84 {
87 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
88 break;
89 case NPC_IRONWING:
90 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
91 break;
92 case NPC_DABIR:
94 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
95
97 AddGossipItemFor(player, gossipmenuid, 1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
98 break;
99 case NPC_BRACK:
101 AddGossipItemFor(player, gossipmenuid, 5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
102
104 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
105
107 AddGossipItemFor(player, gossipmenuid, 4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
108 break;
109 case NPC_IRENA:
111 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
112 break;
113 case NPC_AYREN:
115 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
116
118 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
119 break;
120 case NPC_DRAGONHAWK:
122 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14);
123 break;
124 case NPC_VERONIA:
126 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15);
127 break;
128 case NPC_DEESAK:
130 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 16);
131 break;
132 case NPC_AFRASASTRASZ:
133 // middle -> ground
134 AddGossipItemFor(player, gossipmenuid, 1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 17);
135 // middle -> top
136 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 18);
137 break;
138 case NPC_TARIOLSTRASZ:
139 // ground -> top
140 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 19);
141 // ground -> middle
142 AddGossipItemFor(player, gossipmenuid, 1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 20);
143 break;
144 case NPC_TORASTRASZA:
145 // top -> middle
146 AddGossipItemFor(player, gossipmenuid, 1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
147 // top -> ground
148 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
149 break;
150 case NPC_CESSA:
152 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 25);
153 break;
154 case NPC_KIELAR:
155 AddGossipItemFor(player, gossipmenuid, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 26); // Northpass Tower.
156 AddGossipItemFor(player, gossipmenuid, 1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 27); // Eastwall Tower.
157 AddGossipItemFor(player, gossipmenuid, 2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 28); // Crown Guard Tower.
158 break;
159 }
160
161 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
162 return true;
163 }
std::uint32_t uint32
Definition: Define.h:108
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
@ QUEST_STATUS_REWARDED
Definition: QuestDef.h:106
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:103
@ QUEST_STATUS_COMPLETE
Definition: QuestDef.h:101
@ NPC_AFRASASTRASZ
Definition: npc_taxi.cpp:34
@ NPC_DABIR
Definition: npc_taxi.cpp:27
@ NPC_CESSA
Definition: npc_taxi.cpp:37
@ NPC_AYREN
Definition: npc_taxi.cpp:30
@ NPC_BRACK
Definition: npc_taxi.cpp:28
@ NPC_IRONWING
Definition: npc_taxi.cpp:26
@ NPC_VERONIA
Definition: npc_taxi.cpp:32
@ NPC_TARIOLSTRASZ
Definition: npc_taxi.cpp:35
@ NPC_DEESAK
Definition: npc_taxi.cpp:33
@ NPC_KIELAR
Definition: npc_taxi.cpp:38
@ NPC_TORASTRASZA
Definition: npc_taxi.cpp:36
@ NPC_DRAGONHAWK
Definition: npc_taxi.cpp:31
@ NPC_NETHER_DRAKE
Definition: npc_taxi.cpp:25
@ NPC_IRENA
Definition: npc_taxi.cpp:29
@ QUEST_SURVEY_ALCAZ
Definition: npc_taxi.cpp:67
@ QUEST_GATEWAYS_H
Definition: npc_taxi.cpp:55
@ QUEST_KEEP_AT_BEY
Definition: npc_taxi.cpp:64
@ QUEST_INTERCEPT
Definition: npc_taxi.cpp:63
@ REP_SKYGUARD
Definition: npc_taxi.cpp:43
@ QUEST_DEAD_SCAR
Definition: npc_taxi.cpp:61
@ QUEST_SHATTER_POINT
Definition: npc_taxi.cpp:52
@ QUEST_GATEWAYS_A
Definition: npc_taxi.cpp:51
@ QUEST_NETHERY_WINGS
Definition: npc_taxi.cpp:46
@ ITEM_DISRUPTOR
Definition: npc_taxi.cpp:47
@ QUEST_ABBYSAL
Definition: npc_taxi.cpp:56
@ QUEST_AIR_STRIKE
Definition: npc_taxi.cpp:62
@ QUEST_ABBYSAL_DAILY
Definition: npc_taxi.cpp:57
@ QUEST_BEHIND_ENEMY
Definition: npc_taxi.cpp:48
@ QUEST_SPINEBREAKER
Definition: npc_taxi.cpp:58
@ REP_HONORED
Definition: SharedDefines.h:185
CreatureTemplate const * GetCreatureTemplate() const
Definition: Creature.h:199
uint32 GossipMenuId
Definition: CreatureData.h:187
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:1401
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
Definition: PlayerStorage.cpp:683
void PrepareQuestMenu(ObjectGuid guid)
Definition: PlayerQuest.cpp:39
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1416
ReputationRank GetReputationRank(uint32 faction_id) const
Definition: Player.cpp:5777
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: PlayerGossip.cpp:403
bool IsQuestGiver() const
Definition: Unit.h:1667

References AddGossipItemFor(), Creature::GetCreatureTemplate(), Object::GetEntry(), Player::GetGossipTextId(), Object::GetGUID(), Player::GetQuestRewardStatus(), Player::GetQuestStatus(), Player::GetReputationRank(), GOSSIP_ACTION_INFO_DEF, GOSSIP_SENDER_MAIN, CreatureTemplate::GossipMenuId, Player::HasItemCount(), Unit::IsQuestGiver(), ITEM_DISRUPTOR, NPC_AFRASASTRASZ, NPC_AYREN, NPC_BRACK, NPC_CESSA, NPC_DABIR, NPC_DEESAK, NPC_DRAGONHAWK, NPC_IRENA, NPC_IRONWING, NPC_KIELAR, NPC_NETHER_DRAKE, NPC_TARIOLSTRASZ, NPC_TORASTRASZA, NPC_VERONIA, Player::PrepareQuestMenu(), QUEST_ABBYSAL, QUEST_ABBYSAL_DAILY, QUEST_AIR_STRIKE, QUEST_BEHIND_ENEMY, QUEST_DEAD_SCAR, QUEST_GATEWAYS_A, QUEST_GATEWAYS_H, QUEST_INTERCEPT, QUEST_KEEP_AT_BEY, QUEST_NETHERY_WINGS, QUEST_SHATTER_POINT, QUEST_SPINEBREAKER, QUEST_STATUS_COMPLETE, QUEST_STATUS_INCOMPLETE, QUEST_STATUS_REWARDED, QUEST_SURVEY_ALCAZ, REP_HONORED, REP_SKYGUARD, and SendGossipMenuFor().

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

166 {
167 ClearGossipMenuFor(player);
168 switch (action)
169 {
170 case GOSSIP_ACTION_INFO_DEF + 1:
171 CloseGossipMenuFor(player);
172 player->CastSpell(player, 35731, true); //TaxiPath 628
173 break;
174 case GOSSIP_ACTION_INFO_DEF + 3:
175 CloseGossipMenuFor(player);
176 player->CastSpell(player, 53335, true); //TaxiPath 1041 (Stormwind Harbor)
177 break;
178 case GOSSIP_ACTION_INFO_DEF + 4:
179 CloseGossipMenuFor(player);
180 player->CastSpell(player, 33768, true); //TaxiPath 585 (Gateways Murket and Shaadraz)
181 break;
182 case GOSSIP_ACTION_INFO_DEF + 5:
183 CloseGossipMenuFor(player);
184 player->CastSpell(player, 35069, true); //TaxiPath 612 (Taxi - Hellfire Peninsula - Expedition Point to Shatter Point)
185 break;
186 case GOSSIP_ACTION_INFO_DEF + 8:
187 CloseGossipMenuFor(player);
188 player->CastSpell(player, 33659, true); //TaxiPath 584 (Gateways Murket and Shaadraz)
189 break;
190 case GOSSIP_ACTION_INFO_DEF + 9:
191 CloseGossipMenuFor(player);
192 player->CastSpell(player, 33825, true); //TaxiPath 587 (Aerial Assault Flight (Horde))
193 break;
194 case GOSSIP_ACTION_INFO_DEF + 10:
195 CloseGossipMenuFor(player);
196 player->CastSpell(player, 34578, true); //TaxiPath 604 (Taxi - Reaver's Fall to Spinebreaker Ridge)
197 break;
198 case GOSSIP_ACTION_INFO_DEF + 11:
199 CloseGossipMenuFor(player);
200 player->CastSpell(player, 41278, true); //TaxiPath 706
201 break;
202 case GOSSIP_ACTION_INFO_DEF + 12:
203 CloseGossipMenuFor(player);
204 player->CastSpell(player, 45071, true); //TaxiPath 779
205 break;
206 case GOSSIP_ACTION_INFO_DEF + 13:
207 CloseGossipMenuFor(player);
208 player->CastSpell(player, 45113, true); //TaxiPath 784
209 break;
210 case GOSSIP_ACTION_INFO_DEF + 14:
211 CloseGossipMenuFor(player);
212 player->CastSpell(player, 45353, true); //TaxiPath 788
213 break;
214 case GOSSIP_ACTION_INFO_DEF + 15:
215 CloseGossipMenuFor(player);
216 player->CastSpell(player, 34905, true); //TaxiPath 606
217 break;
218 case GOSSIP_ACTION_INFO_DEF + 16:
219 CloseGossipMenuFor(player);
220 player->CastSpell(player, 41279, true); //TaxiPath 705 (Taxi - Skettis to Skyguard Outpost)
221 break;
222 case GOSSIP_ACTION_INFO_DEF + 17:
223 CloseGossipMenuFor(player);
224 player->ActivateTaxiPathTo(882);
225 break;
226 case GOSSIP_ACTION_INFO_DEF + 18:
227 CloseGossipMenuFor(player);
228 player->ActivateTaxiPathTo(881);
229 break;
230 case GOSSIP_ACTION_INFO_DEF + 19:
231 CloseGossipMenuFor(player);
232 player->ActivateTaxiPathTo(878);
233 break;
234 case GOSSIP_ACTION_INFO_DEF + 20:
235 CloseGossipMenuFor(player);
236 player->ActivateTaxiPathTo(883);
237 break;
238 case GOSSIP_ACTION_INFO_DEF + 21:
239 CloseGossipMenuFor(player);
240 player->ActivateTaxiPathTo(880);
241 break;
242 case GOSSIP_ACTION_INFO_DEF + 22:
243 CloseGossipMenuFor(player);
244 player->ActivateTaxiPathTo(879);
245 break;
246 case GOSSIP_ACTION_INFO_DEF + 25:
247 CloseGossipMenuFor(player);
248 player->CastSpell(player, 42295, true);
249 break;
250 case GOSSIP_ACTION_INFO_DEF + 26:
251 CloseGossipMenuFor(player);
252 player->ActivateTaxiPathTo(494);
253 break;
254 case GOSSIP_ACTION_INFO_DEF + 27:
255 CloseGossipMenuFor(player);
256 player->ActivateTaxiPathTo(495);
257 break;
258 case GOSSIP_ACTION_INFO_DEF + 28:
259 CloseGossipMenuFor(player);
260 player->ActivateTaxiPathTo(496);
261 break;
262 }
263
264 return true;
265 }
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:10149
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.