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

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ achievement_sa_defense_of_the_ancients()

achievement_sa_defense_of_the_ancients::achievement_sa_defense_of_the_ancients ( )
inline
187: AchievementCriteriaScript("achievement_sa_defense_of_the_ancients") { }
Definition: ScriptMgr.h:976

Member Function Documentation

◆ OnCheck()

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

Reimplemented from AchievementCriteriaScript.

190 {
191 Battleground* bg = source->GetBattleground();
192 return bg && bg->GetBgTypeID(true) == BATTLEGROUND_SA && bg->ToBattlegroundSA()->AllowDefenseOfTheAncients(source);
193 }
@ BATTLEGROUND_SA
Definition: SharedDefines.h:3461
Definition: Battleground.h:293
BattlegroundSA * ToBattlegroundSA()
Definition: Battleground.h:587
BattlegroundTypeId GetBgTypeID(bool GetRandom=false) const
Definition: Battleground.h:319
bool AllowDefenseOfTheAncients(Player *source)
Definition: BattlegroundSA.cpp:1129
Battleground * GetBattleground(bool create=false) const
Definition: Player.cpp:12097

References BattlegroundSA::AllowDefenseOfTheAncients(), BATTLEGROUND_SA, Player::GetBattleground(), Battleground::GetBgTypeID(), and Battleground::ToBattlegroundSA().