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

Classes

struct  npc_simoneAI
 

Public Member Functions

 npc_simone ()
 
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
 
- 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_simone()

npc_simone::npc_simone ( )
inline
520: CreatureScript("npc_simone") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ GetAI()

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

Reimplemented from CreatureScript.

523 {
524 return new npc_simoneAI(creature);
525 }

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

824 {
826 {
827 uint32 gossipMenuId = creature->GetCreatureTemplate()->GossipMenuId;
829 }
830
831 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
832
833 return true;
834 }
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
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:103
@ QUEST_STAVE_OF_THE_ANCIENTS
Definition: npc_stave_of_ancients.h:36
@ GOSSIP_EVENT_START_OPTION_ID
Definition: npc_stave_of_ancients.h:27
@ SIMONE_HEAD
Definition: npc_stave_of_ancients.h:77
CreatureTemplate const * GetCreatureTemplate() const
Definition: Creature.h:199
uint32 GossipMenuId
Definition: CreatureData.h:187
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
Definition: PlayerStorage.cpp:683
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1416
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: PlayerGossip.cpp:403

References AddGossipItemFor(), 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, SendGossipMenuFor(), and SIMONE_HEAD.

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

813 {
814 CloseGossipMenuFor(player);
815 if (creature->AI() && CAST_AI(npc_simone::npc_simoneAI, creature->AI()))
816 {
817 CAST_AI(npc_simone::npc_simoneAI, creature->AI())->ScheduleEncounterStart(player->GetGUID());
818 }
819
820 return true;
821 }
#define CAST_AI(a, b)
Definition: ScriptedCreature.h:28
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
CreatureAI * AI() const
Definition: Creature.h:136
Definition: npc_stave_of_ancients.cpp:528

References Creature::AI(), CAST_AI, CloseGossipMenuFor(), and Object::GetGUID().