mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-06 20:37:45 +00:00
refactor(Core/Logging): switch to fmt style for LOG_ (#10366)
* feat(Core/Common): add support fmt style for ASSERT and ABORT * correct CheckCompactArrayMaskOverflow * 1 * Update src/server/game/Spells/Spell.cpp * rework logging * add fmt replace logs * logging * FMT_LOG_ * settings * fix startup * 1 * 2 * 3 * 4 * 5 * fmt::print * to fmt
This commit is contained in:
@@ -114,13 +114,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)
|
||||
{
|
||||
LOG_DEBUG("outdoorpvp", "Creating capture point %u", entry);
|
||||
LOG_DEBUG("outdoorpvp", "Creating capture point {}", entry);
|
||||
|
||||
// check info existence
|
||||
GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry);
|
||||
if (!goinfo || goinfo->type != GAMEOBJECT_TYPE_CAPTURE_POINT)
|
||||
{
|
||||
LOG_ERROR("outdoorpvp", "OutdoorPvP: GO %u is not capture point!", entry);
|
||||
LOG_ERROR("outdoorpvp", "OutdoorPvP: GO {} is not capture point!", entry);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ bool OPvPCapturePoint::DelCreature(uint32 type)
|
||||
ObjectGuid::LowType spawnId = m_Creatures[type];
|
||||
if (!spawnId)
|
||||
{
|
||||
LOG_DEBUG("outdoorpvp", "opvp creature type %u was already deleted", type);
|
||||
LOG_DEBUG("outdoorpvp", "opvp creature type {} was already deleted", type);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ bool OPvPCapturePoint::DelCreature(uint32 type)
|
||||
c->RemoveCorpse();
|
||||
c->AddObjectToRemoveList();
|
||||
}
|
||||
LOG_DEBUG("outdoorpvp", "deleting opvp creature type %u", type);
|
||||
LOG_DEBUG("outdoorpvp", "deleting opvp creature type {}", type);
|
||||
// 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
|
||||
@@ -266,7 +266,7 @@ void OutdoorPvP::HandlePlayerLeaveZone(Player* player, uint32 /*zone*/)
|
||||
if (!player->GetSession()->PlayerLogout())
|
||||
SendRemoveWorldStates(player);
|
||||
m_players[player->GetTeamId()].erase(player->GetGUID());
|
||||
LOG_DEBUG("outdoorpvp", "Player %s left an outdoorpvp zone", player->GetName().c_str());
|
||||
LOG_DEBUG("outdoorpvp", "Player {} left an outdoorpvp zone", player->GetName());
|
||||
}
|
||||
|
||||
void OutdoorPvP::HandlePlayerResurrects(Player* /*player*/, uint32 /*zone*/)
|
||||
|
||||
@@ -71,7 +71,7 @@ void OutdoorPvPMgr::InitOutdoorPvP()
|
||||
|
||||
if (typeId >= MAX_OUTDOORPVP_TYPES)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Invalid OutdoorPvPTypes value %u in outdoorpvp_template; skipped.", typeId);
|
||||
LOG_ERROR("sql.sql", "Invalid OutdoorPvPTypes value {} in outdoorpvp_template; skipped.", typeId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -90,20 +90,20 @@ void OutdoorPvPMgr::InitOutdoorPvP()
|
||||
OutdoorPvPDataMap::iterator iter = m_OutdoorPvPDatas.find(OutdoorPvPTypes(i));
|
||||
if (iter == m_OutdoorPvPDatas.end())
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Could not initialize OutdoorPvP object for type ID %u; no entry in database.", uint32(i));
|
||||
LOG_ERROR("sql.sql", "Could not initialize OutdoorPvP object for type ID {}; no entry in database.", uint32(i));
|
||||
continue;
|
||||
}
|
||||
|
||||
pvp = sScriptMgr->CreateOutdoorPvP(iter->second);
|
||||
if (!pvp)
|
||||
{
|
||||
LOG_ERROR("outdoorpvp", "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 {}; got nullptr pointer from script.", uint32(i));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!pvp->SetupOutdoorPvP())
|
||||
{
|
||||
LOG_ERROR("outdoorpvp", "Could not initialize OutdoorPvP object for type ID %u; SetupOutdoorPvP failed.", uint32(i));
|
||||
LOG_ERROR("outdoorpvp", "Could not initialize OutdoorPvP object for type ID {}; SetupOutdoorPvP failed.", uint32(i));
|
||||
delete pvp;
|
||||
continue;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ void OutdoorPvPMgr::InitOutdoorPvP()
|
||||
m_OutdoorPvPSet.push_back(pvp);
|
||||
}
|
||||
|
||||
LOG_INFO("server.loading", ">> Loaded %u outdoor PvP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", ">> Loaded {} outdoor PvP definitions in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ void OutdoorPvPMgr::HandlePlayerEnterZone(Player* player, uint32 zoneid)
|
||||
return;
|
||||
|
||||
itr->second->HandlePlayerEnterZone(player, zoneid);
|
||||
LOG_DEBUG("outdoorpvp", "Player %s entered outdoorpvp id %u", player->GetGUID().ToString().c_str(), itr->second->GetTypeId());
|
||||
LOG_DEBUG("outdoorpvp", "Player {} entered outdoorpvp id {}", player->GetGUID().ToString(), itr->second->GetTypeId());
|
||||
}
|
||||
|
||||
void OutdoorPvPMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
|
||||
@@ -148,7 +148,7 @@ void OutdoorPvPMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
|
||||
return;
|
||||
|
||||
itr->second->HandlePlayerLeaveZone(player, zoneid);
|
||||
LOG_DEBUG("outdoorpvp", "Player %s left outdoorpvp id %u", player->GetGUID().ToString().c_str(), itr->second->GetTypeId());
|
||||
LOG_DEBUG("outdoorpvp", "Player {} left outdoorpvp id {}", player->GetGUID().ToString(), itr->second->GetTypeId());
|
||||
}
|
||||
|
||||
OutdoorPvP* OutdoorPvPMgr::GetOutdoorPvPToZoneId(uint32 zoneid)
|
||||
|
||||
Reference in New Issue
Block a user