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

Classes

struct  boss_majordomoAI
 

Public Member Functions

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

◆ boss_majordomo()

boss_majordomo::boss_majordomo ( )
inline
137: CreatureScript("boss_majordomo") {}
Definition: CreatureScript.h:25

Member Function Documentation

◆ GetAI()

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

Reimplemented from CreatureScript.

578 {
579 return GetMoltenCoreAI<boss_majordomoAI>(creature);
580 }

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

533 {
535 SendGossipMenuFor(player, TEXT_ID_SUMMON_1, creature->GetGUID());
536 return true;
537 }
@ GOSSIP_ITEM_SUMMON_1
Definition: boss_majordomo_executus.cpp:102
@ TEXT_ID_SUMMON_1
Definition: boss_majordomo_executus.cpp:98
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
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112

References AddGossipItemFor(), Object::GetGUID(), GOSSIP_ACTION_INFO_DEF, GOSSIP_ITEM_SUMMON_1, GOSSIP_SENDER_MAIN, SendGossipMenuFor(), and TEXT_ID_SUMMON_1.

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

540 {
541 ClearGossipMenuFor(player);
542 switch (action)
543 {
545 {
547 SendGossipMenuFor(player, TEXT_ID_SUMMON_2, creature->GetGUID());
548 break;
549 }
551 {
553 SendGossipMenuFor(player, TEXT_ID_SUMMON_2, creature->GetGUID());
554 break;
555 }
557 {
559 SendGossipMenuFor(player, TEXT_ID_SUMMON_3, creature->GetGUID());
560 break;
561 }
563 {
564 CloseGossipMenuFor(player);
566 creature->AI()->Talk(SAY_RAG_SUM_1, player);
568 break;
569 }
570 default:
571 CloseGossipMenuFor(player);
572 break;
573 }
574 return true;
575 }
@ ACTION_START_RAGNAROS_INTRO
Definition: molten_core.h:49
@ TEXT_ID_SUMMON_2
Definition: boss_majordomo_executus.cpp:99
@ TEXT_ID_SUMMON_3
Definition: boss_majordomo_executus.cpp:100
@ GOSSIP_ITEM_SUMMON_2
Definition: boss_majordomo_executus.cpp:103
@ GOSSIP_ITEM_SUMMON_3
Definition: boss_majordomo_executus.cpp:104
@ SAY_RAG_SUM_1
Definition: boss_majordomo_executus.cpp:42
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:294
virtual void DoAction(int32)
Definition: UnitAI.h:212
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
Definition: CreatureAI.cpp:50
CreatureAI * AI() const
Definition: Creature.h:140
void RemoveNpcFlag(NPCFlags flags)
Definition: Unit.h:727

References ACTION_START_RAGNAROS_INTRO, AddGossipItemFor(), Creature::AI(), ClearGossipMenuFor(), CloseGossipMenuFor(), UnitAI::DoAction(), Object::GetGUID(), GOSSIP_ACTION_INFO_DEF, GOSSIP_ITEM_SUMMON_2, GOSSIP_ITEM_SUMMON_3, GOSSIP_SENDER_MAIN, Unit::RemoveNpcFlag(), SAY_RAG_SUM_1, SendGossipMenuFor(), CreatureAI::Talk(), TEXT_ID_SUMMON_2, TEXT_ID_SUMMON_3, and UNIT_NPC_FLAG_GOSSIP.