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

Public Member Functions

 at_the_beast_room ()
 
bool OnTrigger (Player *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 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_the_beast_room()

at_the_beast_room::at_the_beast_room ( )
inline
304: AreaTriggerScript("at_the_beast_room") { }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

bool at_the_beast_room::OnTrigger ( Player player,
AreaTrigger const *   
)
inlineoverridevirtual

Reimplemented from AreaTriggerScript.

307 {
308 if (player->IsGameMaster())
309 {
310 return false;
311 }
312
313 if (InstanceScript* instance = player->GetInstanceScript())
314 {
315 if (Creature* beast = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_THE_BEAST)))
316 {
317 beast->AI()->SetData(DATA_BEAST_ROOM, DATA_BEAST_ROOM);
318 }
319
320 return true;
321 }
322
323 return false;
324 }
@ DATA_BEAST_ROOM
Definition: boss_the_beast.cpp:48
@ DATA_THE_BEAST
Definition: blackrock_spire.h:43
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
Definition: Creature.h:46
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
bool IsGameMaster() const
Definition: Player.h:1158
Definition: InstanceScript.h:142

References DATA_BEAST_ROOM, DATA_THE_BEAST, ObjectAccessor::GetCreature(), WorldObject::GetInstanceScript(), and Player::IsGameMaster().