diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-01-08 21:16:53 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-01-08 21:16:53 +0100 |
commit | d791afae1dfcfaf592326f787755ca32d629e4d3 (patch) | |
tree | 54dc9916ede5800e110a2f0edff91530811fbdb8 /src/server/game/Battlegrounds/BattlegroundMgr.cpp | |
parent | b6820a706f46f18b9652fcd9806e4bec8805d29d (diff) |
Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
Diffstat (limited to 'src/server/game/Battlegrounds/BattlegroundMgr.cpp')
-rw-r--r-- | src/server/game/Battlegrounds/BattlegroundMgr.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index 58e8243b990..d609d683fe7 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -323,7 +323,7 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundQueueTypeId que if (!bg_template) { - TC_LOG_ERROR("bg.battleground", "Battleground: CreateNewBattleground - bg template not found for %u", bgTypeId); + TC_LOG_ERROR("bg.battleground", "Battleground: CreateNewBattleground - bg template not found for {}", bgTypeId); return nullptr; } @@ -492,7 +492,7 @@ void BattlegroundMgr::LoadBattlegroundTemplates() BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId); if (!bl) { - TC_LOG_ERROR("bg.battleground", "Battleground ID %u could not be found in BattlemasterList.dbc. The battleground was not created.", bgTypeId); + TC_LOG_ERROR("bg.battleground", "Battleground ID {} could not be found in BattlemasterList.dbc. The battleground was not created.", bgTypeId); continue; } @@ -510,10 +510,10 @@ void BattlegroundMgr::LoadBattlegroundTemplates() if (WorldSafeLocsEntry const* start = sObjectMgr->GetWorldSafeLoc(startId)) bgTemplate.StartLocation[TEAM_ALLIANCE] = start; else if (bgTemplate.StartLocation[TEAM_ALLIANCE]) // reload case - TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u contains a non-existing WorldSafeLocs.dbc id %u in field `AllianceStartLoc`. Ignoring.", bgTemplate.Id, startId); + TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id {} contains a non-existing WorldSafeLocs.dbc id {} in field `AllianceStartLoc`. Ignoring.", bgTemplate.Id, startId); else { - TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u contains a non-existing WorldSafeLocs.dbc id %u in field `AllianceStartLoc`. BG not created.", bgTemplate.Id, startId); + TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id {} contains a non-existing WorldSafeLocs.dbc id {} in field `AllianceStartLoc`. BG not created.", bgTemplate.Id, startId); _battlegroundTemplates.erase(bgTypeId); continue; } @@ -522,10 +522,10 @@ void BattlegroundMgr::LoadBattlegroundTemplates() if (WorldSafeLocsEntry const* start = sObjectMgr->GetWorldSafeLoc(startId)) bgTemplate.StartLocation[TEAM_HORDE] = start; else if (bgTemplate.StartLocation[TEAM_HORDE]) // reload case - TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u contains a non-existing WorldSafeLocs.dbc id %u in field `HordeStartLoc`. Ignoring.", bgTemplate.Id, startId); + TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id {} contains a non-existing WorldSafeLocs.dbc id {} in field `HordeStartLoc`. Ignoring.", bgTemplate.Id, startId); else { - TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u contains a non-existing WorldSafeLocs.dbc id %u in field `HordeStartLoc`. BG not created.", bgTemplate.Id, startId); + TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id {} contains a non-existing WorldSafeLocs.dbc id {} in field `HordeStartLoc`. BG not created.", bgTemplate.Id, startId); _battlegroundTemplates.erase(bgTypeId); continue; } @@ -533,7 +533,7 @@ void BattlegroundMgr::LoadBattlegroundTemplates() if (!CreateBattleground(&bgTemplate)) { - TC_LOG_ERROR("bg.battleground", "Could not create battleground template class (%u)!", bgTemplate.Id); + TC_LOG_ERROR("bg.battleground", "Could not create battleground template class ({})!", bgTemplate.Id); _battlegroundTemplates.erase(bgTypeId); continue; } @@ -545,7 +545,7 @@ void BattlegroundMgr::LoadBattlegroundTemplates() } while (result->NextRow()); - TC_LOG_INFO("server.loading", ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + TC_LOG_INFO("server.loading", ">> Loaded {} battlegrounds in {} ms", count, GetMSTimeDiffToNow(oldMSTime)); } void BattlegroundMgr::SendBattlegroundList(Player* player, ObjectGuid const& guid, BattlegroundTypeId bgTypeId) @@ -572,11 +572,11 @@ void BattlegroundMgr::SendToBattleground(Player* player, uint32 instanceId, Batt uint32 team = player->GetBGTeam(); WorldSafeLocsEntry const* pos = bg->GetTeamStartPosition(Battleground::GetTeamIndexByTeamId(team)); - TC_LOG_DEBUG("bg.battleground", "BattlegroundMgr::SendToBattleground: Sending %s to map %u, %s (bgType %u)", player->GetName().c_str(), mapid, pos->Loc.ToString().c_str(), bgTypeId); + TC_LOG_DEBUG("bg.battleground", "BattlegroundMgr::SendToBattleground: Sending {} to map {}, {} (bgType {})", player->GetName(), mapid, pos->Loc.ToString(), bgTypeId); player->TeleportTo(pos->Loc); } else - TC_LOG_ERROR("bg.battleground", "BattlegroundMgr::SendToBattleground: Instance %u (bgType %u) not found while trying to teleport player %s", instanceId, bgTypeId, player->GetName().c_str()); + TC_LOG_ERROR("bg.battleground", "BattlegroundMgr::SendToBattleground: Instance {} (bgType {}) not found while trying to teleport player {}", instanceId, bgTypeId, player->GetName()); } void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player* player, Battleground* bg, ObjectGuid const& guid) @@ -726,18 +726,18 @@ void BattlegroundMgr::LoadBattleMastersEntry() if (CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(entry)) { if ((cInfo->npcflag & UNIT_NPC_FLAG_BATTLEMASTER) == 0) - TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) listed in `battlemaster_entry` is not a battlemaster.", entry); + TC_LOG_ERROR("sql.sql", "Creature (Entry: {}) listed in `battlemaster_entry` is not a battlemaster.", entry); } else { - TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) listed in `battlemaster_entry` does not exist.", entry); + TC_LOG_ERROR("sql.sql", "Creature (Entry: {}) listed in `battlemaster_entry` does not exist.", entry); continue; } uint32 bgTypeId = fields[1].GetUInt32(); if (!sBattlemasterListStore.LookupEntry(bgTypeId)) { - TC_LOG_ERROR("sql.sql", "Table `battlemaster_entry` contains entry %u for a non-existing battleground type %u, ignored.", entry, bgTypeId); + TC_LOG_ERROR("sql.sql", "Table `battlemaster_entry` contains entry {} for a non-existing battleground type {}, ignored.", entry, bgTypeId); continue; } @@ -747,7 +747,7 @@ void BattlegroundMgr::LoadBattleMastersEntry() CheckBattleMasters(); - TC_LOG_INFO("server.loading", ">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + TC_LOG_INFO("server.loading", ">> Loaded {} battlemaster entries in {} ms", count, GetMSTimeDiffToNow(oldMSTime)); } void BattlegroundMgr::CheckBattleMasters() @@ -757,7 +757,7 @@ void BattlegroundMgr::CheckBattleMasters() { if ((creatureTemplatePair.second.npcflag & UNIT_NPC_FLAG_BATTLEMASTER) && !mBattleMastersMap.count(creatureTemplatePair.first)) { - TC_LOG_ERROR("sql.sql", "Creature_Template Entry: %u has UNIT_NPC_FLAG_BATTLEMASTER, but no data in the `battlemaster_entry` table. Removing flag.", creatureTemplatePair.first); + TC_LOG_ERROR("sql.sql", "Creature_Template Entry: {} has UNIT_NPC_FLAG_BATTLEMASTER, but no data in the `battlemaster_entry` table. Removing flag.", creatureTemplatePair.first); const_cast<CreatureTemplate&>(creatureTemplatePair.second).npcflag &= ~UNIT_NPC_FLAG_BATTLEMASTER; } } |