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

Classes

struct  npc_artoriusAI
 

Public Member Functions

 npc_artorius ()
 
CreatureAIGetAI (Creature *creature) const override
 
bool OnGossipSelect (Player *player, Creature *creature, uint32, uint32) override
 
bool OnGossipHello (Player *player, Creature *creature) 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_artorius()

npc_artorius::npc_artorius ( )
inline
275: CreatureScript("npc_artorius") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ GetAI()

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

Reimplemented from CreatureScript.

278 {
279 return new npc_artoriusAI(creature);
280 }

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

440 {
442 {
443 uint32 gossipMenuId = creature->GetCreatureTemplate()->GossipMenuId;
445 }
446
447 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
448
449 return true;
450 }
std::uint32_t uint32
Definition: Define.h:107
@ 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
@ QUEST_STAVE_OF_THE_ANCIENTS
Definition: npc_stave_of_ancients.h:35
@ GOSSIP_EVENT_START_OPTION_ID
Definition: npc_stave_of_ancients.h:26
@ ARTORIUS_HEAD
Definition: npc_stave_of_ancients.h:56
CreatureTemplate const * GetCreatureTemplate() const
Definition: Creature.h:206
uint32 GossipMenuId
Definition: CreatureData.h:197
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
Definition: PlayerStorage.cpp:661
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1424
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: PlayerGossip.cpp:404

References AddGossipItemFor(), ARTORIUS_HEAD, Creature::GetCreatureTemplate(), Player::GetGossipTextId(), Object::GetGUID(), Player::GetQuestStatus(), GOSSIP_EVENT_START_OPTION_ID, GOSSIP_SENDER_MAIN, CreatureTemplate::GossipMenuId, Player::HasItemCount(), QUEST_STATUS_INCOMPLETE, QUEST_STAVE_OF_THE_ANCIENTS, and SendGossipMenuFor().

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

432 {
433 CloseGossipMenuFor(player);
434 creature->AI()->DoAction(EVENT_ENCOUNTER_START);
435
436 return true;
437 }
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
@ EVENT_ENCOUNTER_START
Definition: npc_stave_of_ancients.h:29
virtual void DoAction(int32)
Definition: UnitAI.h:212
CreatureAI * AI() const
Definition: Creature.h:143

References Creature::AI(), CloseGossipMenuFor(), UnitAI::DoAction(), and EVENT_ENCOUNTER_START.