AzeorthCore 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
 

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

achievement_resilient_victory::achievement_resilient_victory ( )
inline
31: AchievementCriteriaScript("achievement_resilient_victory") { }
Definition: ScriptMgr.h:975

Member Function Documentation

◆ OnCheck()

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

Reimplemented from AchievementCriteriaScript.

34 {
35 Battleground* bg = source->GetBattleground();
36 return bg && bg->GetBgTypeID(true) == BATTLEGROUND_AB && bg->ToBattlegroundAB()->IsTeamScores500Disadvantage(source->GetTeamId());
37 }
@ BATTLEGROUND_AB
Definition: SharedDefines.h:3455
Definition: Battleground.h:293
BattlegroundAB * ToBattlegroundAB()
Definition: Battleground.h:572
BattlegroundTypeId GetBgTypeID(bool GetRandom=false) const
Definition: Battleground.h:319
bool IsTeamScores500Disadvantage(TeamId teamId) const
Definition: BattlegroundAB.h:311
TeamId GetTeamId(bool original=false) const
Definition: Player.h:2058
Battleground * GetBattleground(bool create=false) const
Definition: Player.cpp:11915

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