AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
AchievementScript Class Reference

#include "AchievementScript.h"

Inheritance diagram for AchievementScript:
ScriptObject

Public Member Functions

bool IsDatabaseBound () const override
 
virtual void SetRealmCompleted (AchievementEntry const *)
 
virtual bool IsCompletedCriteria (AchievementMgr *, AchievementCriteriaEntry const *, AchievementEntry const *, CriteriaProgress const *)
 
virtual bool IsRealmCompleted (AchievementGlobalMgr const *, AchievementEntry const *, SystemTimePoint)
 
virtual void OnBeforeCheckCriteria (AchievementMgr *, std::list< AchievementCriteriaEntry const * > const *)
 
virtual bool CanCheckCriteria (AchievementMgr *, AchievementCriteriaEntry const *)
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
uint16 GetTotalAvailableHooks ()
 

Protected Member Functions

 AchievementScript (const char *name, std::vector< uint16 > enabledHooks=std::vector< uint16 >())
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ AchievementScript()

AchievementScript::AchievementScript ( const char *  name,
std::vector< uint16 enabledHooks = std::vector<uint16>() 
)
protected
49{
50 // If empty - enable all available hooks.
51 if (enabledHooks.empty())
52 for (uint16 i = 0; i < ACHIEVEMENTHOOK_END; ++i)
53 enabledHooks.emplace_back(i);
54
55 ScriptRegistry<AchievementScript>::AddScript(this, std::move(enabledHooks));
56}
std::uint16_t uint16
Definition: Define.h:108
@ ACHIEVEMENTHOOK_END
Definition: AchievementScript.h:33
static void AddScript(TScript *const script, std::vector< uint16 > enabledHooks={})
Definition: ScriptMgr.h:738
Definition: ScriptObject.h:43

References ACHIEVEMENTHOOK_END, and ScriptRegistry< TScript >::AddScript().

Member Function Documentation

◆ CanCheckCriteria()

virtual bool AchievementScript::CanCheckCriteria ( AchievementMgr ,
AchievementCriteriaEntry const *   
)
inlinevirtual
53{ return true; }

◆ IsCompletedCriteria()

virtual bool AchievementScript::IsCompletedCriteria ( AchievementMgr ,
AchievementCriteriaEntry const *  ,
AchievementEntry const *  ,
CriteriaProgress const *   
)
inlinevirtual
47{ return true; }

◆ IsDatabaseBound()

bool AchievementScript::IsDatabaseBound ( ) const
inlineoverridevirtual

Reimplemented from ScriptObject.

42{ return false; }

◆ IsRealmCompleted()

virtual bool AchievementScript::IsRealmCompleted ( AchievementGlobalMgr const *  ,
AchievementEntry const *  ,
SystemTimePoint   
)
inlinevirtual
49{ return true; }

◆ OnBeforeCheckCriteria()

virtual void AchievementScript::OnBeforeCheckCriteria ( AchievementMgr ,
std::list< AchievementCriteriaEntry const * > const *   
)
inlinevirtual
51{ }

◆ SetRealmCompleted()

virtual void AchievementScript::SetRealmCompleted ( AchievementEntry const *  )
inlinevirtual
45{ }