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

Public Member Functions

 npc_augustus_the_touched ()
bool OnGossipSelect (Player *player, Creature *creature, uint32, uint32 action) 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_augustus_the_touched()

npc_augustus_the_touched::npc_augustus_the_touched ( )
323: CreatureScript("npc_augustus_the_touched") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

bool npc_augustus_the_touched::OnGossipHello ( Player player,
Creature creature 

Reimplemented from CreatureScript.

334 {
335 if (creature->IsQuestGiver())
336 player->PrepareQuestMenu(creature->GetGUID());
338 if (creature->IsVendor() && player->GetQuestRewardStatus(6164))
341 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
342 return true;
343 }
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
Definition: ScriptedGossip.h:25
Definition: ScriptedGossip.h:70
Definition: ScriptedGossip.h:56
Definition: GossipDef.h:61
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
bool GetQuestRewardStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1401
void PrepareQuestMenu(ObjectGuid guid)
Definition: PlayerQuest.cpp:39
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: PlayerGossip.cpp:403
bool IsQuestGiver() const
Definition: Unit.h:1667
bool IsVendor() const
Definition: Unit.h:1665

References AddGossipItemFor(), Player::GetGossipTextId(), Object::GetGUID(), Player::GetQuestRewardStatus(), GOSSIP_ACTION_TRADE, GOSSIP_ICON_VENDOR, GOSSIP_SENDER_MAIN, GOSSIP_TEXT_BROWSE_GOODS, Unit::IsQuestGiver(), Unit::IsVendor(), Player::PrepareQuestMenu(), and SendGossipMenuFor().

◆ OnGossipSelect()

bool npc_augustus_the_touched::OnGossipSelect ( Player player,
Creature creature,
uint32  ,
uint32  action 

Reimplemented from CreatureScript.

326 {
327 ClearGossipMenuFor(player);
328 if (action == GOSSIP_ACTION_TRADE)
329 player->GetSession()->SendListInventory(creature->GetGUID());
330 return true;
331 }
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
WorldSession * GetSession() const
Definition: Player.h:1961
void SendListInventory(ObjectGuid guid, uint32 vendorEntry=0)
Definition: ItemHandler.cpp:1035

References ClearGossipMenuFor(), Object::GetGUID(), Player::GetSession(), GOSSIP_ACTION_TRADE, and WorldSession::SendListInventory().