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

Public Member Functions

 npc_roxi_ramrocket ()
 
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_roxi_ramrocket()

npc_roxi_ramrocket::npc_roxi_ramrocket ( )
inline
694: CreatureScript("npc_roxi_ramrocket") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

697 {
698 //Quest Menu
699 if (creature->IsQuestGiver())
700 player->PrepareQuestMenu(creature->GetGUID());
701
702 //Trainer Menu
703 if (creature->IsTrainer())
705
706 //Vendor Menu
707 if (creature->IsVendor())
710
711 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
712 return true;
713 }
@ SPELL_MECHANO_HOG
Definition: zone_storm_peaks.cpp:687
@ SPELL_MEKGINEERS_CHOPPER
Definition: zone_storm_peaks.cpp:688
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
#define GOSSIP_TEXT_TRAIN
Definition: ScriptedGossip.h:26
#define GOSSIP_TEXT_BROWSE_GOODS
Definition: ScriptedGossip.h:25
@ GOSSIP_SENDER_MAIN
Definition: ScriptedGossip.h:70
@ GOSSIP_ACTION_TRADE
Definition: ScriptedGossip.h:56
@ GOSSIP_ACTION_TRAIN
Definition: ScriptedGossip.h:57
@ GOSSIP_ICON_TRAINER
Definition: GossipDef.h:64
@ GOSSIP_ICON_VENDOR
Definition: GossipDef.h:62
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
void PrepareQuestMenu(ObjectGuid guid)
Definition: PlayerQuest.cpp:39
bool HasSpell(uint32 spell) const override
Definition: Player.cpp:3892
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: PlayerGossip.cpp:404
bool IsTrainer() const
Definition: Unit.h:761
bool IsQuestGiver() const
Definition: Unit.h:762
bool IsVendor() const
Definition: Unit.h:760

References AddGossipItemFor(), Player::GetGossipTextId(), Object::GetGUID(), GOSSIP_ACTION_TRADE, GOSSIP_ACTION_TRAIN, GOSSIP_ICON_TRAINER, GOSSIP_ICON_VENDOR, GOSSIP_SENDER_MAIN, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_TEXT_TRAIN, Player::HasSpell(), Unit::IsQuestGiver(), Unit::IsTrainer(), Unit::IsVendor(), Player::PrepareQuestMenu(), SendGossipMenuFor(), SPELL_MECHANO_HOG, and SPELL_MEKGINEERS_CHOPPER.

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

716 {
717 ClearGossipMenuFor(player);
718 switch (action)
719 {
721 player->GetSession()->SendTrainerList(creature->GetGUID());
722 break;
724 player->GetSession()->SendListInventory(creature->GetGUID());
725 break;
726 }
727 return true;
728 }
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
WorldSession * GetSession() const
Definition: Player.h:1998
void SendListInventory(ObjectGuid guid, uint32 vendorEntry=0)
Definition: ItemHandler.cpp:1035
void SendTrainerList(ObjectGuid guid)
Definition: NPCHandler.cpp:87

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