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

Classes

struct  npc_highlord_darion_mograineAI
 

Public Member Functions

 npc_highlord_darion_mograine ()
 
CreatureAIGetAI (Creature *creature) const override
 
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_highlord_darion_mograine()

npc_highlord_darion_mograine::npc_highlord_darion_mograine ( )
inline
334: CreatureScript("npc_highlord_darion_mograine") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ GetAI()

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

Reimplemented from CreatureScript.

337 {
338 return new npc_highlord_darion_mograineAI(creature);
339 }

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

342 {
343 if (creature->IsQuestGiver())
344 player->PrepareQuestMenu(creature->GetGUID());
345
346 if (player->GetQuestStatus(12801) == QUEST_STATUS_INCOMPLETE && !creature->AI()->GetData(WORLD_STATE_SOLDIERS_ENABLE))
348
349 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
350
351 return true;
352 }
@ WORLD_STATE_SOLDIERS_ENABLE
Definition: chapter5.cpp:203
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
virtual uint32 GetData(uint32) const
Definition: UnitAI.h:213
CreatureAI * AI() const
Definition: Creature.h:140
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
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(), Creature::AI(), UnitAI::GetData(), Player::GetGossipTextId(), Object::GetGUID(), Player::GetQuestStatus(), GOSSIP_ACTION_INFO_DEF, GOSSIP_SENDER_MAIN, Unit::IsQuestGiver(), Player::PrepareQuestMenu(), QUEST_STATUS_INCOMPLETE, SendGossipMenuFor(), and WORLD_STATE_SOLDIERS_ENABLE.

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

355 {
356 if (action == GOSSIP_ACTION_INFO_DEF + 1)
357 {
358 ClearGossipMenuFor(player);
359 CloseGossipMenuFor(player);
360 creature->AI()->DoAction(ACTION_START_EVENT);
361 }
362 return true;
363 }
@ ACTION_START_EVENT
Definition: chapter5.cpp:193
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
virtual void DoAction(int32)
Definition: UnitAI.h:212

References ACTION_START_EVENT, Creature::AI(), ClearGossipMenuFor(), CloseGossipMenuFor(), UnitAI::DoAction(), and GOSSIP_ACTION_INFO_DEF.