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

Public Member Functions

 achievement_not_even_a_scratch ()
 
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_not_even_a_scratch()

achievement_not_even_a_scratch::achievement_not_even_a_scratch ( )
inline
231: AchievementCriteriaScript("achievement_not_even_a_scratch") { }
Definition: ScriptMgr.h:975

Member Function Documentation

◆ OnCheck()

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

Reimplemented from AchievementCriteriaScript.

234 {
235 if (!source)
236 return false;
237
238 Battleground* battleground = source->GetBattleground();
239 return battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_SA && battleground->ToBattlegroundSA()->notEvenAScratch(source->GetTeamId());
240 }
@ 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 notEvenAScratch(TeamId teamId) const
Definition: BattlegroundSA.h:532
TeamId GetTeamId(bool original=false) const
Definition: Player.h:2058
Battleground * GetBattleground(bool create=false) const
Definition: Player.cpp:11915

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