feat(Core/Misc): remove and replace ACE_Singleton (#2418)

This commit is contained in:
Kargatum
2019-12-21 00:29:29 +07:00
committed by GitHub
parent 16b45bf334
commit 4a8f1de538
88 changed files with 486 additions and 250 deletions

View File

@@ -18,19 +18,21 @@ ChannelMgr::~ChannelMgr()
ChannelMgr* ChannelMgr::forTeam(TeamId teamId)
{
static ChannelMgr allianceChannelMgr(TEAM_ALLIANCE);
static ChannelMgr hordeChannelMgr(TEAM_HORDE);
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
return ACE_Singleton<AllianceChannelMgr, ACE_Null_Mutex>::instance(); // cross-faction
return &allianceChannelMgr; // cross-faction
if (teamId == TEAM_ALLIANCE)
return ACE_Singleton<AllianceChannelMgr, ACE_Null_Mutex>::instance();
return &allianceChannelMgr;
if (teamId == TEAM_HORDE)
return ACE_Singleton<HordeChannelMgr, ACE_Null_Mutex>::instance();
return &hordeChannelMgr;
return NULL;
return nullptr;
}
void ChannelMgr::LoadChannels()
{
uint32 oldMSTime = getMSTime();

View File

@@ -8,13 +8,10 @@
#include "Common.h"
#include "Channel.h"
#include <ace/Singleton.h>
#include "World.h"
#include <map>
#include <string>
#include "World.h"
#define MAX_CHANNEL_PASS_STR 31
class ChannelMgr