aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/MapInstanced.cpp
diff options
context:
space:
mode:
authorMachiavelli <none@none>2010-06-25 00:18:01 +0200
committerMachiavelli <none@none>2010-06-25 00:18:01 +0200
commit0f7657b68c8b6444fadb480cdd0f87631391afa5 (patch)
treea5ffdaecbb1332ffbc655916842a23a622340c98 /src/server/game/Maps/MapInstanced.cpp
parenta6b9e716a61334e218cff227f66b0c51053e72f3 (diff)
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
Diffstat (limited to 'src/server/game/Maps/MapInstanced.cpp')
-rw-r--r--src/server/game/Maps/MapInstanced.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp
index 0736bfa6fb3..008baeb79d9 100644
--- a/src/server/game/Maps/MapInstanced.cpp
+++ b/src/server/game/Maps/MapInstanced.cpp
@@ -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());