Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-12-23 23:25:44 +01:00
parent 95daf7998f
commit 928443d899
245 changed files with 5711 additions and 5714 deletions
@@ -35,8 +35,8 @@ void MapManager::LoadTransports()
if (!result)
{
sLog.outString(">> Loaded 0 transports. DB table `transports` is empty!");
sLog.outString();
sLog->outString(">> Loaded 0 transports. DB table `transports` is empty!");
sLog->outString();
return;
}
@@ -58,26 +58,26 @@ void MapManager::LoadTransports()
if (!goinfo)
{
sLog.outErrorDb("Transport ID:%u, Name: %s, will not be loaded, gameobject_template missing", entry, name.c_str());
sLog->outErrorDb("Transport ID:%u, Name: %s, will not be loaded, gameobject_template missing", entry, name.c_str());
delete t;
continue;
}
if (goinfo->type != GAMEOBJECT_TYPE_MO_TRANSPORT)
{
sLog.outErrorDb("Transport ID:%u, Name: %s, will not be loaded, gameobject_template type wrong", entry, name.c_str());
sLog->outErrorDb("Transport ID:%u, Name: %s, will not be loaded, gameobject_template type wrong", entry, name.c_str());
delete t;
continue;
}
// sLog.outString("Loading transport %d between %s, %s", entry, name.c_str(), goinfo->name);
// sLog->outString("Loading transport %d between %s, %s", entry, name.c_str(), goinfo->name);
std::set<uint32> mapsUsed;
if (!t->GenerateWaypoints(goinfo->moTransport.taxiPathId, mapsUsed))
// skip transports with empty waypoints list
{
sLog.outErrorDb("Transport (path id %u) path size = 0. Transport ignored, check DBC files or transport GO data0 field.",goinfo->moTransport.taxiPathId);
sLog->outErrorDb("Transport (path id %u) path size = 0. Transport ignored, check DBC files or transport GO data0 field.",goinfo->moTransport.taxiPathId);
delete t;
continue;
}
@@ -119,13 +119,13 @@ void MapManager::LoadTransports()
uint32 guid = fields[0].GetUInt32();
uint32 entry = fields[1].GetUInt32();
std::string name = fields[2].GetString();
sLog.outErrorDb("Transport %u '%s' have record (GUID: %u) in `gameobject`. Transports DON'T must have any records in `gameobject` or its behavior will be unpredictable/bugged.",entry,name.c_str(),guid);
sLog->outErrorDb("Transport %u '%s' have record (GUID: %u) in `gameobject`. Transports DON'T must have any records in `gameobject` or its behavior will be unpredictable/bugged.",entry,name.c_str(),guid);
}
while (result->NextRow());
}
sLog.outString(">> Loaded %u transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
sLog.outString();
sLog->outString(">> Loaded %u transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
void MapManager::LoadTransportNPCs()
@@ -137,8 +137,8 @@ void MapManager::LoadTransportNPCs()
if (!result)
{
sLog.outString(">> Loaded 0 transport NPCs. DB table `creature_transport` is empty!");
sLog.outString();
sLog->outString(">> Loaded 0 transport NPCs. DB table `creature_transport` is empty!");
sLog->outString();
return;
}
@@ -169,8 +169,8 @@ void MapManager::LoadTransportNPCs()
}
while (result->NextRow());
sLog.outString(">> Loaded %u transport npcs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
sLog.outString();
sLog->outString(">> Loaded %u transport npcs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
Transport::Transport(uint32 period, uint32 script) : GameObject(), m_period(period), ScriptId(script)
@@ -196,7 +196,7 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa
if (!IsPositionValid())
{
sLog.outError("Transport (GUID: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
sLog->outError("Transport (GUID: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
guidlow,x,y);
return false;
}
@@ -207,7 +207,7 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa
if (!goinfo)
{
sLog.outErrorDb("Transport not created: entry in `gameobject_template` not found, guidlow: %u map: %u (X: %f Y: %f Z: %f) ang: %f",guidlow, mapid, x, y, z, ang);
sLog->outErrorDb("Transport not created: entry in `gameobject_template` not found, guidlow: %u map: %u (X: %f Y: %f Z: %f) ang: %f",guidlow, mapid, x, y, z, ang);
return false;
}
@@ -354,7 +354,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
}
// for (int i = 0; i < keyFrames.size(); ++i) {
// sLog.outString("%f, %f, %f, %f, %f, %f, %f", keyFrames[i].x, keyFrames[i].y, keyFrames[i].distUntilStop, keyFrames[i].distSinceStop, keyFrames[i].distFromPrev, keyFrames[i].tFrom, keyFrames[i].tTo);
// sLog->outString("%f, %f, %f, %f, %f, %f, %f", keyFrames[i].x, keyFrames[i].y, keyFrames[i].distUntilStop, keyFrames[i].distSinceStop, keyFrames[i].distFromPrev, keyFrames[i].tFrom, keyFrames[i].tTo);
// }
// Now we're completely set up; we can move along the length of each waypoint at 100 ms intervals
@@ -398,7 +398,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
cM = keyFrames[i].node->mapid;
}
// sLog.outString("T: %d, D: %f, x: %f, y: %f, z: %f", t, d, newX, newY, newZ);
// sLog->outString("T: %d, D: %f, x: %f, y: %f, z: %f", t, d, newX, newY, newZ);
WayPoint pos(keyFrames[i].node->mapid, newX, newY, newZ, teleport, 0);
if (teleport)
m_WayPoints[t] = pos;
@@ -447,7 +447,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
WayPoint pos(keyFrames[i + 1].node->mapid, keyFrames[i + 1].node->x, keyFrames[i + 1].node->y, keyFrames[i + 1].node->z, teleport,
0, keyFrames[i + 1].node->arrivalEventID, keyFrames[i + 1].node->departureEventID);
// sLog.outString("T: %d, x: %f, y: %f, z: %f, t:%d", t, pos.x, pos.y, pos.z, teleport);
// sLog->outString("T: %d, x: %f, y: %f, z: %f, t:%d", t, pos.x, pos.y, pos.z, teleport);
/*
if (keyFrames[i+1].delay > 5)
pos.delayed = true;
@@ -456,12 +456,12 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
m_WayPoints[t] = pos;
t += keyFrames[i + 1].node->delay * 1000;
// sLog.outString("------");
// sLog->outString("------");
}
uint32 timer = t;
// sLog.outDetail(" Generated %lu waypoints, total time %u.", (unsigned long)m_WayPoints.size(), timer);
// sLog->outDetail(" Generated %lu waypoints, total time %u.", (unsigned long)m_WayPoints.size(), timer);
m_curr = m_WayPoints.begin();
m_next = GetNextWayPoint();
@@ -520,7 +520,7 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z)
bool Transport::AddPassenger(Player* passenger)
{
if (m_passengers.insert(passenger).second)
sLog.outDetail("Player %s boarded transport %s.", passenger->GetName(), GetName());
sLog->outDetail("Player %s boarded transport %s.", passenger->GetName(), GetName());
sScriptMgr->OnAddPassenger(this, passenger);
return true;
@@ -529,7 +529,7 @@ bool Transport::AddPassenger(Player* passenger)
bool Transport::RemovePassenger(Player* passenger)
{
if (m_passengers.erase(passenger))
sLog.outDetail("Player %s removed from transport %s.", passenger->GetName(), GetName());
sLog->outDetail("Player %s removed from transport %s.", passenger->GetName(), GetName());
sScriptMgr->OnRemovePassenger(this, passenger);
return true;
@@ -540,7 +540,7 @@ void Transport::Update(uint32 p_diff)
if(!AI())
{
if (!AIM_Initialize())
sLog.outError("Could not initialize GameObjectAI for Transport");
sLog->outError("Could not initialize GameObjectAI for Transport");
} else
AI()->UpdateAI(p_diff);
@@ -572,11 +572,11 @@ void Transport::Update(uint32 p_diff)
m_nextNodeTime = m_curr->first;
if (m_curr == m_WayPoints.begin() && (sLog.getLogFilter() & LOG_FILTER_TRANSPORT_MOVES) == 0)
sLog.outDetail(" ************ BEGIN ************** %s", m_name.c_str());
if (m_curr == m_WayPoints.begin() && (sLog->getLogFilter() & LOG_FILTER_TRANSPORT_MOVES) == 0)
sLog->outDetail(" ************ BEGIN ************** %s", m_name.c_str());
if ((sLog.getLogFilter() & LOG_FILTER_TRANSPORT_MOVES) == 0)
sLog.outDetail("%s moved to %d %f %f %f %d", m_name.c_str(), m_curr->second.id, m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid);
if ((sLog->getLogFilter() & LOG_FILTER_TRANSPORT_MOVES) == 0)
sLog->outDetail("%s moved to %d %f %f %f %d", m_name.c_str(), m_curr->second.id, m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid);
}
sScriptMgr->OnTransportUpdate(this, p_diff);
@@ -619,7 +619,7 @@ void Transport::DoEventIfAny(WayPointMap::value_type const& node, bool departure
{
if (uint32 eventid = departure ? node.second.departureEventID : node.second.arrivalEventID)
{
sLog.outDebug("Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.first, GetName());
sLog->outDebug("Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.first, GetName());
GetMap()->ScriptsStart(sEventScripts, eventid, this, this);
EventInform(eventid);
}
@@ -668,7 +668,7 @@ uint32 Transport::AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y,
if(!pCreature->IsPositionValid())
{
sLog.outError("Creature (guidlow %d, entry %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)",pCreature->GetGUIDLow(),pCreature->GetEntry(),pCreature->GetPositionX(),pCreature->GetPositionY());
sLog->outError("Creature (guidlow %d, entry %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)",pCreature->GetGUIDLow(),pCreature->GetEntry(),pCreature->GetPositionX(),pCreature->GetPositionY());
delete pCreature;
return 0;
}