mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
feat(Core/Misc): remove and replace ACE_Singleton (#2418)
This commit is contained in:
@@ -22,6 +22,12 @@ BattlefieldMgr::~BattlefieldMgr()
|
||||
delete *itr;
|
||||
}
|
||||
|
||||
BattlefieldMgr* BattlefieldMgr::instance()
|
||||
{
|
||||
static BattlefieldMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void BattlefieldMgr::InitBattlefield()
|
||||
{
|
||||
Battlefield* pBf = new BattlefieldWG;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#define BATTLEFIELD_MGR_H_
|
||||
|
||||
#include "Battlefield.h"
|
||||
#include "ace/Singleton.h"
|
||||
|
||||
class Player;
|
||||
class GameObject;
|
||||
@@ -25,6 +24,8 @@ class BattlefieldMgr
|
||||
// dtor
|
||||
~BattlefieldMgr();
|
||||
|
||||
static BattlefieldMgr* instance();
|
||||
|
||||
// create battlefield events
|
||||
void InitBattlefield();
|
||||
// called when a player enters an battlefield area
|
||||
@@ -62,6 +63,6 @@ class BattlefieldMgr
|
||||
uint32 m_UpdateTimer;
|
||||
};
|
||||
|
||||
#define sBattlefieldMgr ACE_Singleton<BattlefieldMgr, ACE_Null_Mutex>::instance()
|
||||
#define sBattlefieldMgr BattlefieldMgr::instance()
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user