AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
go_main_chambers_access_panel Class Reference
Inheritance diagram for go_main_chambers_access_panel:
GameObjectScript ScriptObject UpdatableScript< GameObject >

Public Member Functions

 go_main_chambers_access_panel ()
 
bool OnGossipHello (Player *, GameObject *go) override
 
- Public Member Functions inherited from GameObjectScript
bool IsDatabaseBound () const override
 
virtual bool OnGossipHello (Player *, GameObject *)
 
virtual bool OnGossipSelect (Player *, GameObject *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, GameObject *, uint32, uint32, const char *)
 
virtual bool OnQuestAccept (Player *, GameObject *, Quest const *)
 
virtual bool OnQuestReward (Player *, GameObject *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, GameObject *)
 
virtual void OnDestroyed (GameObject *, Player *)
 
virtual void OnDamaged (GameObject *, Player *)
 
virtual void OnModifyHealth (GameObject *, Unit *, int32 &, SpellInfo const *)
 
virtual void OnLootStateChanged (GameObject *, uint32, Unit *)
 
virtual void OnGameObjectStateChanged (GameObject *, uint32)
 
virtual GameObjectAIGetAI (GameObject *) const
 
- 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< GameObject >
virtual void OnUpdate (GameObject *, uint32)
 

Additional Inherited Members

- Protected Member Functions inherited from GameObjectScript
 GameObjectScript (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< GameObject >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ go_main_chambers_access_panel()

go_main_chambers_access_panel::go_main_chambers_access_panel ( )
inline
39: GameObjectScript("go_main_chambers_access_panel") { }
Definition: GameObjectScript.h:25

Member Function Documentation

◆ OnGossipHello()

bool go_main_chambers_access_panel::OnGossipHello ( Player ,
GameObject go 
)
inlineoverridevirtual

Reimplemented from GameObjectScript.

42 {
43 if (InstanceScript* instance = go->GetInstanceScript())
44 {
45 Creature* doorController = instance->GetCreature(DATA_DOOR_CONTROLLER);
47 {
48 if (instance->GetBossState(DATA_HYDROMANCER_THESPIA) == DONE)
49 {
51 if (doorController && doorController->IsAIEnabled)
52 {
53 doorController->AI()->Talk(SAY_FAINT_ECHO);
54 }
55 }
56 }
57 else
58 {
59 if (instance->GetBossState(DATA_MEKGINEER_STEAMRIGGER) == DONE)
60 {
62 if (doorController && doorController->IsAIEnabled)
63 {
64 doorController->AI()->Talk(SAY_FAINT_ECHO);
65 }
66 }
67 }
68
69 if (instance->GetBossState(DATA_HYDROMANCER_THESPIA) == DONE && instance->GetBossState(DATA_MEKGINEER_STEAMRIGGER) == DONE)
70 {
71 if (doorController)
72 {
73 if (doorController->IsAIEnabled)
74 {
75 doorController->AI()->Talk(SAY_LOUD_RUMBLE);
76 }
77
78 doorController->m_Events.AddEventAtOffset([instance]()
79 {
80 if (GameObject* mainGate = instance->GetGameObject(DATA_MAIN_CHAMBERS_DOOR))
81 {
82 instance->HandleGameObject(ObjectGuid::Empty, true, mainGate);
83 }
84 }, 4s);
85 }
86 else if (GameObject* mainGate = instance->GetGameObject(DATA_MAIN_CHAMBERS_DOOR))
87 {
88 instance->HandleGameObject(ObjectGuid::Empty, true, mainGate);
89 }
90 }
91
92 return true;
93 }
94
95 return false;
96 }
@ DONE
Definition: InstanceScript.h:60
@ DATA_MAIN_CHAMBERS_DOOR
Definition: steam_vault.h:38
@ DATA_HYDROMANCER_THESPIA
Definition: steam_vault.h:31
@ DATA_DOOR_CONTROLLER
Definition: steam_vault.h:39
@ DATA_MEKGINEER_STEAMRIGGER
Definition: steam_vault.h:32
@ GO_ACCESS_PANEL_HYDRO
Definition: steam_vault.h:45
@ SAY_LOUD_RUMBLE
Definition: instance_steam_vault.cpp:26
@ SAY_FAINT_ECHO
Definition: instance_steam_vault.cpp:25
@ GO_FLAG_NOT_SELECTABLE
Definition: SharedDefines.h:1607
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
Definition: EventProcessor.h:107
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
Definition: Creature.h:46
CreatureAI * AI() const
Definition: Creature.h:143
Definition: GameObject.h:121
void SetGameObjectFlag(GameObjectFlags flags)
Definition: GameObject.h:219
uint32 GetEntry() const
Definition: Object.h:112
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
EventProcessor m_Events
Definition: Unit.h:1792
bool IsAIEnabled
Definition: Unit.h:1801
Definition: InstanceScript.h:142

References EventProcessor::AddEventAtOffset(), Creature::AI(), DATA_DOOR_CONTROLLER, DATA_HYDROMANCER_THESPIA, DATA_MAIN_CHAMBERS_DOOR, DATA_MEKGINEER_STEAMRIGGER, DONE, ObjectGuid::Empty, Object::GetEntry(), WorldObject::GetInstanceScript(), GO_ACCESS_PANEL_HYDRO, GO_FLAG_NOT_SELECTABLE, Unit::IsAIEnabled, Unit::m_Events, SAY_FAINT_ECHO, SAY_LOUD_RUMBLE, GameObject::SetGameObjectFlag(), and CreatureAI::Talk().