AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
at_karazhan_side_entrance Class Reference
Inheritance diagram for at_karazhan_side_entrance:
OnlyOnceAreaTriggerScript AreaTriggerScript ScriptObject

Public Member Functions

 at_karazhan_side_entrance ()
 
bool _OnTrigger (Player *player, AreaTrigger const *) override
 
- Public Member Functions inherited from OnlyOnceAreaTriggerScript
bool OnTrigger (Player *, AreaTrigger const *) override
 
- Public Member Functions inherited from AreaTriggerScript
bool IsDatabaseBound () const override
 
virtual bool OnTrigger (Player *, AreaTrigger 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 ()
 

Additional Inherited Members

- Protected Member Functions inherited from OnlyOnceAreaTriggerScript
virtual bool _OnTrigger (Player *, AreaTrigger const *)=0
 
void ResetAreaTriggerDone (InstanceScript *, uint32)
 
void ResetAreaTriggerDone (Player const *, AreaTrigger const *)
 
- Protected Member Functions inherited from AreaTriggerScript
 AreaTriggerScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ at_karazhan_side_entrance()

at_karazhan_side_entrance::at_karazhan_side_entrance ( )
inline
571: OnlyOnceAreaTriggerScript("at_karazhan_side_entrance") { }
Definition: AreaTriggerScript.h:36

Member Function Documentation

◆ _OnTrigger()

bool at_karazhan_side_entrance::_OnTrigger ( Player player,
AreaTrigger const *   
)
inlineoverridevirtual

Implements OnlyOnceAreaTriggerScript.

574 {
575 if (InstanceScript* instance = player->GetInstanceScript())
576 {
577 if (instance->GetBossState(DATA_OPERA_PERFORMANCE) == DONE)
578 {
579 if (GameObject* door = instance->GetGameObject(DATA_GO_SIDE_ENTRANCE_DOOR))
580 {
581 instance->HandleGameObject(ObjectGuid::Empty, true, door);
582 door->RemoveGameObjectFlag(GO_FLAG_LOCKED);
583 }
584 }
585 }
586
587 return false;
588 }
@ DONE
Definition: InstanceScript.h:60
@ DATA_GO_SIDE_ENTRANCE_DOOR
Definition: karazhan.h:56
@ DATA_OPERA_PERFORMANCE
Definition: karazhan.h:34
@ GO_FLAG_LOCKED
Definition: SharedDefines.h:1604
Definition: GameObject.h:121
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
Definition: InstanceScript.h:142

References DATA_GO_SIDE_ENTRANCE_DOOR, DATA_OPERA_PERFORMANCE, DONE, ObjectGuid::Empty, WorldObject::GetInstanceScript(), and GO_FLAG_LOCKED.