chore(Core/Logging): replace most server loggers (#5726)
* chore(Core/Logging): replace most server loggers Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -103,15 +103,13 @@ bool OPvPCapturePoint::AddCreature(uint32 type, uint32 entry, uint32 map, float
|
||||
|
||||
bool OPvPCapturePoint::SetCapturePointData(uint32 entry, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("outdoorpvp", "Creating capture point %u", entry);
|
||||
#endif
|
||||
|
||||
// check info existence
|
||||
GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry);
|
||||
if (!goinfo || goinfo->type != GAMEOBJECT_TYPE_CAPTURE_POINT)
|
||||
{
|
||||
LOG_ERROR("server", "OutdoorPvP: GO %u is not capture point!", entry);
|
||||
LOG_ERROR("outdoorpvp", "OutdoorPvP: GO %u is not capture point!", entry);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -132,9 +130,7 @@ bool OPvPCapturePoint::DelCreature(uint32 type)
|
||||
ObjectGuid::LowType spawnId = m_Creatures[type];
|
||||
if (!spawnId)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("outdoorpvp", "opvp creature type %u was already deleted", type);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -149,9 +145,7 @@ bool OPvPCapturePoint::DelCreature(uint32 type)
|
||||
c->RemoveCorpse();
|
||||
c->AddObjectToRemoveList();
|
||||
}
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("outdoorpvp", "deleting opvp creature type %u", type);
|
||||
#endif
|
||||
// explicit removal from map
|
||||
// beats me why this is needed, but with the recent removal "cleanup" some creatures stay in the map if "properly" deleted
|
||||
// so this is a big fat workaround, if AddObjectToRemoveList and DoDelayedMovesAndRemoves worked correctly, this wouldn't be needed
|
||||
@@ -261,9 +255,7 @@ void OutdoorPvP::HandlePlayerLeaveZone(Player* player, uint32 /*zone*/)
|
||||
if (!player->GetSession()->PlayerLogout())
|
||||
SendRemoveWorldStates(player);
|
||||
m_players[player->GetTeamId()].erase(player->GetGUID());
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("outdoorpvp", "Player %s left an outdoorpvp zone", player->GetName().c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
void OutdoorPvP::HandlePlayerResurrects(Player* /*player*/, uint32 /*zone*/)
|
||||
@@ -393,9 +385,11 @@ bool OPvPCapturePoint::Update(uint32 diff)
|
||||
|
||||
if (m_OldState != m_State)
|
||||
{
|
||||
//LOG_ERROR("server", LOG_FILTER_OUTDOORPVP, "%u->%u", m_OldState, m_State);
|
||||
if (oldTeam != m_team)
|
||||
{
|
||||
ChangeTeam(oldTeam);
|
||||
}
|
||||
|
||||
ChangeState();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ void OutdoorPvPMgr::InitOutdoorPvP()
|
||||
if (!result)
|
||||
{
|
||||
LOG_ERROR("sql.sql", ">> Loaded 0 outdoor PvP definitions. DB table `outdoorpvp_template` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -86,13 +86,13 @@ void OutdoorPvPMgr::InitOutdoorPvP()
|
||||
pvp = sScriptMgr->CreateOutdoorPvP(iter->second);
|
||||
if (!pvp)
|
||||
{
|
||||
LOG_ERROR("server", "Could not initialize OutdoorPvP object for type ID %u; got nullptr pointer from script.", uint32(i));
|
||||
LOG_ERROR("outdoorpvp", "Could not initialize OutdoorPvP object for type ID %u; got nullptr pointer from script.", uint32(i));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!pvp->SetupOutdoorPvP())
|
||||
{
|
||||
LOG_ERROR("server", "Could not initialize OutdoorPvP object for type ID %u; SetupOutdoorPvP failed.", uint32(i));
|
||||
LOG_ERROR("outdoorpvp", "Could not initialize OutdoorPvP object for type ID %u; SetupOutdoorPvP failed.", uint32(i));
|
||||
delete pvp;
|
||||
continue;
|
||||
}
|
||||
@@ -100,8 +100,8 @@ void OutdoorPvPMgr::InitOutdoorPvP()
|
||||
m_OutdoorPvPSet.push_back(pvp);
|
||||
}
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u outdoor PvP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u outdoor PvP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void OutdoorPvPMgr::AddZone(uint32 zoneid, OutdoorPvP* handle)
|
||||
@@ -121,9 +121,7 @@ void OutdoorPvPMgr::HandlePlayerEnterZone(Player* player, uint32 zoneid)
|
||||
return;
|
||||
|
||||
itr->second->HandlePlayerEnterZone(player, zoneid);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("outdoorpvp", "Player %s entered outdoorpvp id %u", player->GetGUID().ToString().c_str(), itr->second->GetTypeId());
|
||||
#endif
|
||||
}
|
||||
|
||||
void OutdoorPvPMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
|
||||
@@ -139,9 +137,7 @@ void OutdoorPvPMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
|
||||
return;
|
||||
|
||||
itr->second->HandlePlayerLeaveZone(player, zoneid);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("outdoorpvp", "Player %s left outdoorpvp id %u", player->GetGUID().ToString().c_str(), itr->second->GetTypeId());
|
||||
#endif
|
||||
}
|
||||
|
||||
OutdoorPvP* OutdoorPvPMgr::GetOutdoorPvPToZoneId(uint32 zoneid)
|
||||
|
||||
Reference in New Issue
Block a user