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:
Machiavelli
2010-06-25 00:18:01 +02:00
parent a6b9e716a6
commit 0f7657b68c
109 changed files with 349 additions and 1221 deletions
+5 -9
View File
@@ -22,8 +22,6 @@
#include "DatabaseEnv.h"
#include "SQLStorage.h"
#include "SQLStorageImpl.h"
#include "SingletonImp.h"
#include "Log.h"
#include "MapManager.h"
#include "ObjectMgr.h"
@@ -48,8 +46,6 @@
#include "Vehicle.h"
#include "AchievementMgr.h"
INSTANTIATE_SINGLETON_1(ObjectMgr);
ScriptMapMap sQuestEndScripts;
ScriptMapMap sQuestStartScripts;
ScriptMapMap sSpellScripts;
@@ -1412,7 +1408,7 @@ uint32 ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float
if (!goinfo)
return 0;
Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(mapId));
Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(mapId));
if (!map)
return 0;
@@ -1473,7 +1469,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, Position pos)
AddCreatureToGrid(guid, &data);
// Spawn if necessary (loaded grids only)
if (Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(mapId)))
if (Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(mapId)))
{
// We use spawn coords to spawn
if (!map->Instanceable() && map->IsLoaded(data.posX, data.posY))
@@ -1524,7 +1520,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float
AddCreatureToGrid(guid, &data);
// Spawn if necessary (loaded grids only)
if (Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(mapId)))
if (Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(mapId)))
{
// We use spawn coords to spawn
if (!map->Instanceable() && !map->IsRemovalGrid(x, y))
@@ -5547,7 +5543,7 @@ void ObjectMgr::LoadGraveyardZones()
WorldSafeLocsEntry const *ObjectMgr::GetClosestGraveYard(float x, float y, float z, uint32 MapId, uint32 team)
{
// search for zone associated closest graveyard
uint32 zoneId = MapManager::Instance().GetZoneId(MapId,x,y,z);
uint32 zoneId = sMapMgr.GetZoneId(MapId,x,y,z);
// Simulate std. algorithm:
// found some graveyard associated to (ghost_zone,ghost_map)
@@ -6608,7 +6604,7 @@ void ObjectMgr::LoadCorpses()
continue;
}
ObjectAccessor::Instance().AddCorpse(corpse);
sObjectAccessor.AddCorpse(corpse);
++count;
}