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

Public Member Functions

 at_icc_putricide_trap ()
 
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_icc_putricide_trap()

at_icc_putricide_trap::at_icc_putricide_trap ( )
inline
3611: AreaTriggerScript("at_icc_putricide_trap") { }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

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

Reimplemented from AreaTriggerScript.

3614 {
3615 if (InstanceScript* instance = player->GetInstanceScript())
3616 if (instance->GetData(DATA_PUTRICIDE_TRAP_STATE) == NOT_STARTED && !player->IsGameMaster())
3617 if (Creature* trap = ObjectAccessor::GetCreature(*player, instance->GetGuidData(NPC_PUTRICADES_TRAP)))
3618 trap->AI()->DoAction(ACTION_START_GAUNTLET);
3619 return true;
3620 }
@ NOT_STARTED
Definition: InstanceScript.h:57
@ ACTION_START_GAUNTLET
Definition: icecrown_citadel.cpp:265
@ NPC_PUTRICADES_TRAP
Definition: icecrown_citadel.h:349
@ DATA_PUTRICIDE_TRAP_STATE
Definition: icecrown_citadel.h:145
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 ACTION_START_GAUNTLET, DATA_PUTRICIDE_TRAP_STATE, ObjectAccessor::GetCreature(), WorldObject::GetInstanceScript(), Player::IsGameMaster(), NOT_STARTED, and NPC_PUTRICADES_TRAP.