mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
feat(Core/Misc): remove and replace ACE_Singleton (#2418)
This commit is contained in:
@@ -24,6 +24,12 @@
|
||||
#endif
|
||||
#include <time.h>
|
||||
|
||||
GameEventMgr* GameEventMgr::instance()
|
||||
{
|
||||
static GameEventMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
bool GameEventMgr::CheckOneGameEvent(uint16 entry) const
|
||||
{
|
||||
switch (mGameEvent[entry].state)
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "Define.h"
|
||||
#include <ace/Singleton.h>
|
||||
|
||||
#define max_ge_check_delay DAY // 1 day in seconds
|
||||
|
||||
@@ -83,13 +81,13 @@ class Quest;
|
||||
|
||||
class GameEventMgr
|
||||
{
|
||||
friend class ACE_Singleton<GameEventMgr, ACE_Null_Mutex>;
|
||||
|
||||
private:
|
||||
GameEventMgr();
|
||||
~GameEventMgr() {};
|
||||
|
||||
public:
|
||||
static GameEventMgr* instance();
|
||||
|
||||
typedef std::set<uint16> ActiveEvents;
|
||||
typedef std::vector<GameEventData> GameEventDataMap;
|
||||
ActiveEvents const& GetActiveEventList() const { return m_ActiveEvents; }
|
||||
@@ -169,7 +167,7 @@ class GameEventMgr
|
||||
std::set<uint32> modifiedHolidays;
|
||||
};
|
||||
|
||||
#define sGameEventMgr ACE_Singleton<GameEventMgr, ACE_Null_Mutex>::instance()
|
||||
#define sGameEventMgr GameEventMgr::instance()
|
||||
|
||||
bool IsHolidayActive(HolidayIds id);
|
||||
bool IsEventActive(uint16 event_id);
|
||||
|
||||
Reference in New Issue
Block a user