mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
feat(Core/Misc): remove and replace ACE_Singleton (#2418)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user