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

Public Member Functions

 at_naxxramas_hub_portal ()
 
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_naxxramas_hub_portal()

at_naxxramas_hub_portal::at_naxxramas_hub_portal ( )
inline
1206: AreaTriggerScript("at_naxxramas_hub_portal") { }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

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

Reimplemented from AreaTriggerScript.

1209 {
1210 if (player->IsAlive() && !player->IsInCombat())
1211 {
1212 if (InstanceScript *instance = player->GetInstanceScript())
1213 {
1214 bool AreAllWingsCleared = instance->GetBossState(BOSS_MAEXXNA) == DONE
1215 && (instance->GetBossState(BOSS_LOATHEB) == DONE)
1216 && (instance->GetBossState(BOSS_THADDIUS) == DONE)
1217 && (instance->GetBossState(BOSS_HORSEMAN) == DONE);
1218
1219 if (AreAllWingsCleared)
1220 {
1222 return true;
1223 }
1224 }
1225 }
1226 return false;
1227 }
@ BOSS_HORSEMAN
Definition: naxxramas.h:41
@ BOSS_LOATHEB
Definition: naxxramas.h:34
@ BOSS_MAEXXNA
Definition: naxxramas.h:37
@ BOSS_THADDIUS
Definition: naxxramas.h:38
const Position sapphironEntryTP
Definition: instance_naxxramas.cpp:1201
@ DONE
Definition: InstanceScript.h:60
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1203
float m_positionZ
Definition: Position.h:57
float m_positionX
Definition: Position.h:55
float m_positionY
Definition: Position.h:56
float m_orientation
Definition: Position.h:58
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options=0, Unit *target=nullptr, bool newInstance=false)
Definition: Player.cpp:1334
bool IsAlive() const
Definition: Unit.h:1654
bool IsInCombat() const
Definition: Unit.h:884
Definition: InstanceScript.h:142

References BOSS_HORSEMAN, BOSS_LOATHEB, BOSS_MAEXXNA, BOSS_THADDIUS, DONE, WorldObject::GetInstanceScript(), Unit::IsAlive(), Unit::IsInCombat(), Position::m_orientation, Position::m_positionX, Position::m_positionY, Position::m_positionZ, sapphironEntryTP, and Player::TeleportTo().