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

Classes

struct  npc_shandy_dalaranAI
 

Public Member Functions

 npc_shandy_dalaran ()
 
bool OnGossipHello (Player *player, Creature *creature) override
 
bool OnGossipSelect (Player *player, Creature *creature, uint32, uint32 action) override
 
CreatureAIGetAI (Creature *creature) const 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
 
uint16 GetTotalAvailableHooks ()
 
- 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, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 
- Protected Member Functions inherited from UpdatableScript< Creature >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_shandy_dalaran()

npc_shandy_dalaran::npc_shandy_dalaran ( )
inline
137: CreatureScript("npc_shandy_dalaran") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ GetAI()

CreatureAI * npc_shandy_dalaran::GetAI ( Creature creature) const
inlineoverridevirtual

Reimplemented from CreatureScript.

270 {
271 return new npc_shandy_dalaranAI(creature);
272 }

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

239 {
240 if (creature->IsQuestGiver())
241 player->PrepareQuestMenu(creature->GetGUID());
242
245 {
246 if (player->GetTeamId() == TEAM_ALLIANCE)
248 else
250 }
251
252 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
253 return true;
254 }
@ GOSSIP_AQUANOS_HORDE
Definition: zone_dalaran.cpp:115
@ QUEST_SUITABLE_DISGUISE_H
Definition: zone_dalaran.cpp:107
@ GOSSIP_AQUANOS_ALLIANCE
Definition: zone_dalaran.cpp:114
@ QUEST_SUITABLE_DISGUISE_A
Definition: zone_dalaran.cpp:106
@ GOSSIP_MENU_AQUANOS
Definition: zone_dalaran.cpp:113
@ TEAM_ALLIANCE
Definition: SharedDefines.h:760
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_INCOMPLETE
Definition: QuestDef.h:103
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
TeamId GetTeamId(bool original=false) const
Definition: Player.h:2108
void PrepareQuestMenu(ObjectGuid guid)
Definition: PlayerQuest.cpp:39
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1429
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: PlayerGossip.cpp:404
bool IsQuestGiver() const
Definition: Unit.h:762

References AddGossipItemFor(), Player::GetGossipTextId(), Object::GetGUID(), Player::GetQuestStatus(), Player::GetTeamId(), GOSSIP_ACTION_INFO_DEF, GOSSIP_AQUANOS_ALLIANCE, GOSSIP_AQUANOS_HORDE, GOSSIP_MENU_AQUANOS, GOSSIP_SENDER_MAIN, Unit::IsQuestGiver(), Player::PrepareQuestMenu(), QUEST_STATUS_INCOMPLETE, QUEST_SUITABLE_DISGUISE_A, QUEST_SUITABLE_DISGUISE_H, SendGossipMenuFor(), and TEAM_ALLIANCE.

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

257 {
258 switch (action)
259 {
261 CloseGossipMenuFor(player);
263 creature->AI()->SetData(ACTION_SHANDY_INTRO, 0);
264 break;
265 }
266 return true;
267 }
@ ACTION_SHANDY_INTRO
Definition: zone_dalaran.cpp:81
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
@ UNIT_NPC_FLAG_NONE
Definition: UnitDefines.h:293
virtual void SetData(uint32, uint32)
Definition: UnitAI.h:214
CreatureAI * AI() const
Definition: Creature.h:140
void ReplaceAllNpcFlags(NPCFlags flags)
Definition: Unit.h:728

References ACTION_SHANDY_INTRO, Creature::AI(), CloseGossipMenuFor(), GOSSIP_ACTION_INFO_DEF, Unit::ReplaceAllNpcFlags(), UnitAI::SetData(), and UNIT_NPC_FLAG_NONE.