mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 13:22:48 +01:00
Get rid of Trinity Singleton and Threading patterns and replace them with ACE_Singletons and ACE_GUARD_x macro´s with ACE_Thread_Mutex´es respectively.
Also get rid of unused CountedReference class that used Trinity threading pattern. --HG-- branch : trunk
This commit is contained in:
@@ -170,7 +170,7 @@ Map* MapInstanced::CreateInstance(const uint32 mapId, Player * player)
|
||||
{
|
||||
// if no instanceId via group members or instance saves is found
|
||||
// the instance will be created for the first time
|
||||
NewInstanceId = MapManager::Instance().GenerateInstanceId();
|
||||
NewInstanceId = sMapMgr.GenerateInstanceId();
|
||||
|
||||
Difficulty diff = player->GetGroup() ? player->GetGroup()->GetDifficulty(IsRaid()) : player->GetDifficulty(IsRaid());
|
||||
map = CreateInstance(NewInstanceId, NULL, diff);
|
||||
@@ -183,7 +183,7 @@ Map* MapInstanced::CreateInstance(const uint32 mapId, Player * player)
|
||||
InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save, Difficulty difficulty)
|
||||
{
|
||||
// load/create a map
|
||||
Guard guard(*this);
|
||||
ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);
|
||||
|
||||
// make sure we have a valid map id
|
||||
const MapEntry* entry = sMapStore.LookupEntry(GetId());
|
||||
@@ -219,7 +219,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save,
|
||||
BattleGroundMap* MapInstanced::CreateBattleGround(uint32 InstanceId, BattleGround* bg)
|
||||
{
|
||||
// load/create a map
|
||||
Guard guard(*this);
|
||||
ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);
|
||||
|
||||
sLog.outDebug("MapInstanced::CreateBattleGround: map bg %d for %d created.", InstanceId, GetId());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user