mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
refactor(Core/Chat): PSendSysMessage to fmt (#19449)
* refactor(Core/Chat): PSendSysMessage to `fmt`
This commit is contained in:
@@ -74,13 +74,13 @@ public:
|
||||
uint32 resetTime = bind.extended ? save->GetExtendedResetTime() : save->GetResetTime();
|
||||
uint32 ttr = (resetTime >= GameTime::GetGameTime().count() ? resetTime - GameTime::GetGameTime().count() : 0);
|
||||
std::string timeleft = secsToTimeString(ttr);
|
||||
handler->PSendSysMessage("map: %d, inst: %d, perm: %s, diff: %d, canReset: %s, TTR: %s%s",
|
||||
mapId, save->GetInstanceId(), bind.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str(), (bind.extended ? " (extended)" : ""));
|
||||
handler->PSendSysMessage("map: {}, inst: {}, perm: {}, diff: {}, canReset: {}, TTR: {}{}",
|
||||
mapId, save->GetInstanceId(), bind.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft, (bind.extended ? " (extended)" : ""));
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("player binds: %d", counter);
|
||||
handler->PSendSysMessage("player binds: {}", counter);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
uint32 resetTime = itr->second.extended ? save->GetExtendedResetTime() : save->GetResetTime();
|
||||
uint32 ttr = (resetTime >= GameTime::GetGameTime().count() ? resetTime - GameTime::GetGameTime().count() : 0);
|
||||
std::string timeleft = secsToTimeString(ttr);
|
||||
handler->PSendSysMessage("unbinding map: %d, inst: %d, perm: %s, diff: %d, canReset: %s, TTR: %s%s", itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str(), (itr->second.extended ? " (extended)" : ""));
|
||||
handler->PSendSysMessage("unbinding map: {}, inst: {}, perm: {}, diff: {}, canReset: {}, TTR: {}{}", itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft, (itr->second.extended ? " (extended)" : ""));
|
||||
sInstanceSaveMgr->PlayerUnbindInstance(player->GetGUID(), itr->first, Difficulty(i), true, player);
|
||||
itr = m_boundInstances.begin();
|
||||
counter++;
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("instances unbound: %d", counter);
|
||||
handler->PSendSysMessage("instances unbound: {}", counter);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -131,13 +131,13 @@ public:
|
||||
{
|
||||
uint32 dungeon = 0, battleground = 0, arena = 0, spectators = 0;
|
||||
sMapMgr->GetNumInstances(dungeon, battleground, arena);
|
||||
handler->PSendSysMessage("instances loaded: dungeons (%d), battlegrounds (%d), arenas (%d)", dungeon, battleground, arena);
|
||||
handler->PSendSysMessage("instances loaded: dungeons ({}), battlegrounds ({}), arenas ({})", dungeon, battleground, arena);
|
||||
dungeon = 0;
|
||||
battleground = 0;
|
||||
arena = 0;
|
||||
spectators = 0;
|
||||
sMapMgr->GetNumPlayersInInstances(dungeon, battleground, arena, spectators);
|
||||
handler->SendErrorMessage("players in instances: dungeons (%d), battlegrounds (%d), arenas (%d + %d spect)", dungeon, battleground, arena, spectators);
|
||||
handler->SendErrorMessage("players in instances: dungeons ({}), battlegrounds ({}), arenas ({} + {} spect)", dungeon, battleground, arena, spectators);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
|
||||
map->GetInstanceScript()->SetBossState(encounterId, EncounterState(state));
|
||||
std::string stateName = InstanceScript::GetBossStateName(state);
|
||||
handler->PSendSysMessage(LANG_COMMAND_INST_SET_BOSS_STATE, encounterId, state, stateName.c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_INST_SET_BOSS_STATE, encounterId, state, stateName);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
|
||||
uint32 state = map->GetInstanceScript()->GetBossState(encounterId);
|
||||
std::string stateName = InstanceScript::GetBossStateName(state);
|
||||
handler->PSendSysMessage(LANG_COMMAND_INST_GET_BOSS_STATE, encounterId, state, stateName.c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_INST_GET_BOSS_STATE, encounterId, state, stateName);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user