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

Public Member Functions

 at_blackrock_stadium ()
 
bool OnTrigger (Player *player, const AreaTrigger *) 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_blackrock_stadium()

at_blackrock_stadium::at_blackrock_stadium ( )
inline
746: AreaTriggerScript("at_blackrock_stadium") { }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

bool at_blackrock_stadium::OnTrigger ( Player player,
const AreaTrigger  
)
inlineoverridevirtual

Reimplemented from AreaTriggerScript.

749 {
750 if (player && player->IsAlive())
751 {
752 InstanceScript* instance = player->GetInstanceScript();
753 if (!instance)
754 return false;
755
756 Creature* rend;
758 {
759 if ((rend = player->FindNearestCreature(NPC_WARCHIEF_REND_BLACKHAND, 100.0f, false)))
760 rend->Respawn(true);
761 }
762
763 if ((rend = player->FindNearestCreature(NPC_WARCHIEF_REND_BLACKHAND, 100.0f)))
764 {
766 return true;
767 }
768 }
769
770 return false;
771 }
@ NOT_STARTED
Definition: InstanceScript.h:57
@ NPC_WARCHIEF_REND_BLACKHAND
Definition: blackrock_spire.h:72
@ AREATRIGGER
Definition: blackrock_spire.h:102
@ AREATRIGGER_BLACKROCK_STADIUM
Definition: blackrock_spire.h:104
@ DATA_WARCHIEF_REND_BLACKHAND
Definition: blackrock_spire.h:41
virtual void SetData(uint32, uint32)
Definition: UnitAI.h:214
Definition: Creature.h:46
void Respawn(bool force=false)
Definition: Creature.cpp:2030
CreatureAI * AI() const
Definition: Creature.h:143
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2446
bool IsAlive() const
Definition: Unit.h:1204
Definition: InstanceScript.h:142
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:235

References Creature::AI(), AREATRIGGER, AREATRIGGER_BLACKROCK_STADIUM, DATA_WARCHIEF_REND_BLACKHAND, WorldObject::FindNearestCreature(), InstanceScript::GetBossState(), WorldObject::GetInstanceScript(), Unit::IsAlive(), NOT_STARTED, NPC_WARCHIEF_REND_BLACKHAND, Creature::Respawn(), and UnitAI::SetData().