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

Public Member Functions

 achievement_bg_ic_resource_glut ()
 
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_bg_ic_resource_glut()

achievement_bg_ic_resource_glut::achievement_bg_ic_resource_glut ( )
inline
74: AchievementCriteriaScript("achievement_bg_ic_resource_glut") { }
Definition: ScriptMgr.h:976

Member Function Documentation

◆ OnCheck()

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

Reimplemented from AchievementCriteriaScript.

77 {
78 Battleground* bg = source->GetBattleground();
79 return bg && bg->GetBgTypeID(true) == BATTLEGROUND_IC && bg->ToBattlegroundIC()->IsResourceGlutAllowed(source->GetTeamId());
80 }
@ BATTLEGROUND_IC
Definition: SharedDefines.h:3464
Definition: Battleground.h:293
BattlegroundIC * ToBattlegroundIC()
Definition: Battleground.h:596
BattlegroundTypeId GetBgTypeID(bool GetRandom=false) const
Definition: Battleground.h:319
bool IsResourceGlutAllowed(TeamId teamId) const
Definition: BattlegroundIC.cpp:315
TeamId GetTeamId(bool original=false) const
Definition: Player.h:2059
Battleground * GetBattleground(bool create=false) const
Definition: Player.cpp:12097

References BATTLEGROUND_IC, Player::GetBattleground(), Battleground::GetBgTypeID(), Player::GetTeamId(), BattlegroundIC::IsResourceGlutAllowed(), and Battleground::ToBattlegroundIC().