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

Public Member Functions

 achievement_arena_by_type (char const *name, uint8 arenaType)
 
bool OnCheck (Player *source, Unit *, uint32) override
 
- Public Member Functions inherited from AchievementCriteriaScript
bool IsDatabaseBound () const override
 
virtual bool OnCheck (Player *, Unit *, uint32)
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
uint16 GetTotalAvailableHooks ()
 

Private Attributes

uint8 const _arenaType
 

Additional Inherited Members

- Protected Member Functions inherited from AchievementCriteriaScript
 AchievementCriteriaScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ achievement_arena_by_type()

achievement_arena_by_type::achievement_arena_by_type ( char const *  name,
uint8  arenaType 
)
inline
128 _arenaType(arenaType)
129 {
130 }
Definition: AchievementCriteriaScript.h:24
uint8 const _arenaType
Definition: achievement_scripts.cpp:138

Member Function Documentation

◆ OnCheck()

bool achievement_arena_by_type::OnCheck ( Player source,
Unit ,
uint32   
)
inlineoverridevirtual

Reimplemented from AchievementCriteriaScript.

133 {
134 return source->InArena() && source->GetBattleground()->GetArenaType() == _arenaType;
135 }
uint8 GetArenaType() const
Definition: Battleground.h:357
Battleground * GetBattleground(bool create=false) const
Definition: Player.cpp:12228
bool InArena() const
Definition: Player.cpp:12329

References _arenaType, Battleground::GetArenaType(), Player::GetBattleground(), and Player::InArena().

Member Data Documentation

◆ _arenaType

uint8 const achievement_arena_by_type::_arenaType
private

Referenced by OnCheck().