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

Public Member Functions

 npc_razael_and_lyana ()
 
bool OnGossipHello (Player *player, Creature *creature) override
 
bool OnGossipSelect (Player *player, Creature *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
 
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_razael_and_lyana()

npc_razael_and_lyana::npc_razael_and_lyana ( )
inline
349: CreatureScript("npc_razael_and_lyana") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

352 {
353 if (creature->IsQuestGiver())
354 player->PrepareQuestMenu(creature->GetGUID());
355
357 switch (creature->GetEntry())
358 {
359 case NPC_RAZAEL:
361 {
363 SendGossipMenuFor(player, GOSSIP_TEXTID_RAZAEL1, creature->GetGUID());
364 return true;
365 }
366 break;
367 case NPC_LYANA:
369 {
371 SendGossipMenuFor(player, GOSSIP_TEXTID_LYANA1, creature->GetGUID());
372 return true;
373 }
374 break;
375 }
376 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
377 return true;
378 }
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:103
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_TEXTID_LYANA1
Definition: zone_howling_fjord.cpp:342
@ NPC_LYANA
Definition: zone_howling_fjord.cpp:339
@ GOSSIP_TEXTID_RAZAEL1
Definition: zone_howling_fjord.cpp:340
@ QUEST_REPORTS_FROM_THE_FIELD
Definition: zone_howling_fjord.cpp:337
@ NPC_RAZAEL
Definition: zone_howling_fjord.cpp:338
uint32 GetEntry() const
Definition: Object.h:112
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
uint16 GetReqKillOrCastCurrentCount(uint32 quest_id, int32 entry)
Definition: PlayerQuest.cpp:1745
void PrepareQuestMenu(ObjectGuid guid)
Definition: PlayerQuest.cpp:39
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1424
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: PlayerGossip.cpp:404
bool IsQuestGiver() const
Definition: Unit.h:718

References AddGossipItemFor(), Object::GetEntry(), Player::GetGossipTextId(), Object::GetGUID(), Player::GetQuestStatus(), Player::GetReqKillOrCastCurrentCount(), GOSSIP_ACTION_INFO_DEF, GOSSIP_SENDER_MAIN, GOSSIP_TEXTID_LYANA1, GOSSIP_TEXTID_RAZAEL1, Unit::IsQuestGiver(), NPC_LYANA, NPC_RAZAEL, Player::PrepareQuestMenu(), QUEST_REPORTS_FROM_THE_FIELD, QUEST_STATUS_INCOMPLETE, and SendGossipMenuFor().

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

381 {
382 ClearGossipMenuFor(player);
383 switch (action)
384 {
385 case GOSSIP_ACTION_INFO_DEF + 1:
386 SendGossipMenuFor(player, GOSSIP_TEXTID_RAZAEL2, creature->GetGUID());
387 player->TalkedToCreature(NPC_RAZAEL, creature->GetGUID());
388 break;
389 case GOSSIP_ACTION_INFO_DEF + 2:
390 SendGossipMenuFor(player, GOSSIP_TEXTID_LYANA2, creature->GetGUID());
391 player->TalkedToCreature(NPC_LYANA, creature->GetGUID());
392 break;
393 }
394 return true;
395 }
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
@ GOSSIP_TEXTID_RAZAEL2
Definition: zone_howling_fjord.cpp:341
@ GOSSIP_TEXTID_LYANA2
Definition: zone_howling_fjord.cpp:343
void TalkedToCreature(uint32 entry, ObjectGuid guid)
Definition: PlayerQuest.cpp:2106

References ClearGossipMenuFor(), Object::GetGUID(), GOSSIP_ACTION_INFO_DEF, GOSSIP_TEXTID_LYANA2, GOSSIP_TEXTID_RAZAEL2, NPC_LYANA, NPC_RAZAEL, SendGossipMenuFor(), and Player::TalkedToCreature().