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

Public Member Functions

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

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

achievement_resilient_victory::achievement_resilient_victory ( )
inline
30: AchievementCriteriaScript("achievement_resilient_victory") { }
Definition: AchievementCriteriaScript.h:24

Member Function Documentation

◆ OnCheck()

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

Reimplemented from AchievementCriteriaScript.

33 {
34 Battleground* bg = source->GetBattleground();
35 return bg && bg->GetBgTypeID(true) == BATTLEGROUND_AB && bg->ToBattlegroundAB()->IsTeamScores500Disadvantage(source->GetTeamId());
36 }
@ BATTLEGROUND_AB
Definition: SharedDefines.h:3483
Definition: Battleground.h:298
BattlegroundAB * ToBattlegroundAB()
Definition: Battleground.h:573
BattlegroundTypeId GetBgTypeID(bool GetRandom=false) const
Definition: Battleground.h:324
bool IsTeamScores500Disadvantage(TeamId teamId) const
Definition: BattlegroundAB.h:311
TeamId GetTeamId(bool original=false) const
Definition: Player.h:2088
Battleground * GetBattleground(bool create=false) const
Definition: Player.cpp:12192

References BATTLEGROUND_AB, Player::GetBattleground(), Battleground::GetBgTypeID(), Player::GetTeamId(), BattlegroundAB::IsTeamScores500Disadvantage(), and Battleground::ToBattlegroundAB().