AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
at_trigger_the_beast_movement Class Reference

The beast room areatrigger, this one triggers boss pathing. (AT Id 2066) More...

Inheritance diagram for at_trigger_the_beast_movement:
AreaTriggerScript ScriptObject

Public Member Functions

 at_trigger_the_beast_movement ()
 
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

The beast room areatrigger, this one triggers boss pathing. (AT Id 2066)

Constructor & Destructor Documentation

◆ at_trigger_the_beast_movement()

at_trigger_the_beast_movement::at_trigger_the_beast_movement ( )
inline
278: AreaTriggerScript("at_trigger_the_beast_movement") { }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

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

Reimplemented from AreaTriggerScript.

281 {
282 if (player->IsGameMaster())
283 {
284 return false;
285 }
286
287 if (InstanceScript* instance = player->GetInstanceScript())
288 {
289 if (Creature* beast = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_THE_BEAST)))
290 {
291 beast->AI()->SetData(DATA_BEAST_REACHED, DATA_BEAST_REACHED);
292 }
293
294 return true;
295 }
296
297 return false;
298 }
@ DATA_BEAST_REACHED
Definition: boss_the_beast.cpp:47
@ 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_REACHED, DATA_THE_BEAST, ObjectAccessor::GetCreature(), WorldObject::GetInstanceScript(), and Player::IsGameMaster().