Core/Server: correct timestamp format for shutdown/restart notification broadcasts

Port From (https://github.com/TrinityCore/TrinityCore/commit/69f768605082222a3ca573c623d3fc019106be3b)
This commit is contained in:
hondacrx
2022-01-07 10:03:32 -05:00
parent 7a63e227ed
commit 5f8744fa69
9 changed files with 94 additions and 26 deletions
+3 -3
View File
@@ -1738,11 +1738,11 @@ namespace Game.Chat
// Output III. LANG_PINFO_BANNED if ban exists and is applied
if (banTime >= 0)
handler.SendSysMessage(CypherStrings.PinfoBanned, banType, banReason, banTime > 0 ? Time.secsToTimeString((ulong)(banTime - GameTime.GetGameTime()), true) : handler.GetCypherString(CypherStrings.Permanently), bannedBy);
handler.SendSysMessage(CypherStrings.PinfoBanned, banType, banReason, banTime > 0 ? Time.secsToTimeString((ulong)(banTime - GameTime.GetGameTime()), TimeFormat.ShortText) : handler.GetCypherString(CypherStrings.Permanently), bannedBy);
// Output IV. LANG_PINFO_MUTED if mute is applied
if (muteTime > 0)
handler.SendSysMessage(CypherStrings.PinfoMuted, muteReason, Time.secsToTimeString((ulong)(muteTime - GameTime.GetGameTime()), true), muteBy);
handler.SendSysMessage(CypherStrings.PinfoMuted, muteReason, Time.secsToTimeString((ulong)(muteTime - GameTime.GetGameTime()), TimeFormat.ShortText), muteBy);
// Output V. LANG_PINFO_ACC_ACCOUNT
handler.SendSysMessage(CypherStrings.PinfoAccAccount, userName, accId, security);
@@ -1817,7 +1817,7 @@ namespace Game.Chat
}
// Output XX. LANG_PINFO_CHR_PLAYEDTIME
handler.SendSysMessage(CypherStrings.PinfoChrPlayedtime, (Time.secsToTimeString(totalPlayerTime, true, true)));
handler.SendSysMessage(CypherStrings.PinfoChrPlayedtime, (Time.secsToTimeString(totalPlayerTime, TimeFormat.ShortText, true)));
// Mail Data - an own query, because it may or may not be useful.
// SQL: "SELECT SUM(CASE WHEN (checked & 1) THEN 1 ELSE 0 END) AS 'readmail', COUNT(*) AS 'totalmail' FROM mail WHERE `receiver` = ?"