mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
feat(Core/Misc): remove and replace ACE_Singleton (#2418)
This commit is contained in:
@@ -158,6 +158,12 @@ World::~World()
|
||||
//TODO free addSessQueue
|
||||
}
|
||||
|
||||
World* World::instance()
|
||||
{
|
||||
static World instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
/// Find a player in a specified zone
|
||||
Player* World::FindPlayerInZone(uint32 zone)
|
||||
{
|
||||
@@ -182,7 +188,7 @@ bool World::IsClosed() const
|
||||
{
|
||||
return m_isClosed;
|
||||
}
|
||||
|
||||
|
||||
void World::SetClosed(bool val)
|
||||
{
|
||||
m_isClosed = val;
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "Timer.h"
|
||||
#include <ace/Singleton.h>
|
||||
#include <ace/Atomic_Op.h>
|
||||
#include "SharedDefines.h"
|
||||
#include "QueryResult.h"
|
||||
@@ -563,11 +562,13 @@ struct PetitionData
|
||||
class World
|
||||
{
|
||||
public:
|
||||
static uint32 m_worldLoopCounter;
|
||||
|
||||
World();
|
||||
~World();
|
||||
|
||||
static World* instance();
|
||||
|
||||
static uint32 m_worldLoopCounter;
|
||||
|
||||
WorldSession* FindSession(uint32 id) const;
|
||||
WorldSession* FindOfflineSession(uint32 id) const;
|
||||
WorldSession* FindOfflineSessionForCharacterGUID(uint32 guidLow) const;
|
||||
@@ -897,7 +898,7 @@ class World
|
||||
|
||||
std::string m_configFileList;
|
||||
};
|
||||
|
||||
#define sWorld ACE_Singleton<World, ACE_Null_Mutex>::instance()
|
||||
|
||||
#define sWorld World::instance()
|
||||
#endif
|
||||
/// @}
|
||||
|
||||
Reference in New Issue
Block a user