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

Public Member Functions

 achievement_wg_within_our_grasp ()
 
bool OnCheck (Player *, 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_wg_within_our_grasp()

achievement_wg_within_our_grasp::achievement_wg_within_our_grasp ( )
inline
1154: AchievementCriteriaScript("achievement_wg_within_our_grasp") { }
Definition: AchievementCriteriaScript.h:24

Member Function Documentation

◆ OnCheck()

bool achievement_wg_within_our_grasp::OnCheck ( Player ,
Unit ,
uint32   
)
inlineoverridevirtual

Reimplemented from AchievementCriteriaScript.

1157 {
1158 Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
1159 if (!wintergrasp)
1160 return false;
1161
1162 return wintergrasp->GetTimer() >= (20 * MINUTE * IN_MILLISECONDS);
1163 }
constexpr auto IN_MILLISECONDS
Definition: Common.h:53
constexpr auto MINUTE
Definition: Common.h:47
@ BATTLEFIELD_BATTLEID_WG
Definition: Battlefield.h:37
#define sBattlefieldMgr
Definition: BattlefieldMgr.h:77
Definition: Battlefield.h:206
uint32 GetTimer()
Definition: Battlefield.h:354

References BATTLEFIELD_BATTLEID_WG, Battlefield::GetTimer(), IN_MILLISECONDS, MINUTE, and sBattlefieldMgr.