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

Public Member Functions

 go_shadowforge_brazier ()
 
bool OnGossipHello (Player *, GameObject *go) override
 
- Public Member Functions inherited from GameObjectScript
bool IsDatabaseBound () const override
 
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 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_shadowforge_brazier()

go_shadowforge_brazier::go_shadowforge_brazier ( )
inline
40: GameObjectScript("go_shadowforge_brazier") {}
Definition GameObjectScript.h:25

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from GameObjectScript.

43 {
44 if (InstanceScript* instance = go->GetInstanceScript())
45 {
46 GameObject* northBrazier = ObjectAccessor::GetGameObject(*go, instance->GetGuidData(DATA_SF_BRAZIER_N));
47 GameObject* southBrazier = ObjectAccessor::GetGameObject(*go, instance->GetGuidData(DATA_SF_BRAZIER_S));
48
49 if (!northBrazier || !southBrazier)
50 {
51 return false;
52 }
53
54 // should only happen on first brazier
55 if (instance->GetData(TYPE_LYCEUM) == NOT_STARTED)
56 {
57 instance->SetData(TYPE_LYCEUM, IN_PROGRESS);
58 }
59
60 // Check if the opposite brazier is lit - if it is, open the gates.
61 if ((go->GetGUID() == northBrazier->GetGUID() && southBrazier->GetGoState() == GO_STATE_ACTIVE) || (go->GetGUID() == southBrazier->GetGUID() && northBrazier->GetGoState() == GO_STATE_ACTIVE))
62 {
63 instance->SetData(TYPE_LYCEUM, DONE);
64 }
65 return false;
66 }
67 return false;
68 };
@ GO_STATE_ACTIVE
Definition GameObjectData.h:691
@ IN_PROGRESS
Definition InstanceScript.h:59
@ DONE
Definition InstanceScript.h:61
@ NOT_STARTED
Definition InstanceScript.h:58
@ TYPE_LYCEUM
Definition blackrock_depths.h:44
@ DATA_SF_BRAZIER_N
Definition blackrock_depths.h:65
@ DATA_SF_BRAZIER_S
Definition blackrock_depths.h:66
Definition GameObject.h:120
GOState GetGoState() const
Definition GameObject.h:204
Definition InstanceScript.h:143
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:113
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1221
GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:184

References DATA_SF_BRAZIER_N, DATA_SF_BRAZIER_S, DONE, ObjectAccessor::GetGameObject(), GameObject::GetGoState(), Object::GetGUID(), WorldObject::GetInstanceScript(), GO_STATE_ACTIVE, IN_PROGRESS, NOT_STARTED, and TYPE_LYCEUM.


The documentation for this class was generated from the following file: