Core/Misc: Replace Time.UnixTime with GameTime.GetGameTime()

Port From (https://github.com/TrinityCore/TrinityCore/commit/e17e4e6f0700c7d950e1b2654c217ec8b28ae79e)
This commit is contained in:
hondacrx
2021-04-17 19:28:50 -04:00
parent 95889fa53c
commit 63f0f919e2
68 changed files with 217 additions and 218 deletions
+2 -2
View File
@@ -341,7 +341,7 @@ namespace Game.SupportSystem
}
}
long GetAge(ulong t) { return (Time.UnixTime - (long)t) / Time.Day; }
long GetAge(ulong t) { return (GameTime.GetGameTime() - (long)t) / Time.Day; }
IEnumerable<KeyValuePair<uint, ComplaintTicket>> GetComplaintsByPlayerGuid(ObjectGuid playerGuid)
{
@@ -361,7 +361,7 @@ namespace Game.SupportSystem
public void SetComplaintSystemStatus(bool status) { _complaintSystemStatus = status; }
public void SetSuggestionSystemStatus(bool status) { _suggestionSystemStatus = status; }
public void UpdateLastChange() { _lastChange = (ulong)Time.UnixTime; }
public void UpdateLastChange() { _lastChange = (ulong)GameTime.GetGameTime(); }
public uint GenerateBugId() { return ++_lastBugId; }
public uint GenerateComplaintId() { return ++_lastComplaintId; }
+4 -4
View File
@@ -39,7 +39,7 @@ namespace Game.SupportSystem
public Ticket() { }
public Ticket(Player player)
{
_createTime = (ulong)Time.UnixTime;
_createTime = (ulong)GameTime.GetGameTime();
_playerGuid = player.GetGUID();
}
@@ -184,7 +184,7 @@ namespace Game.SupportSystem
public override string FormatViewMessageString(CommandHandler handler, bool detailed = false)
{
var curTime = (ulong)Time.UnixTime;
var curTime = (ulong)GameTime.GetGameTime();
StringBuilder ss = new();
ss.Append(handler.GetParsedString(CypherStrings.CommandTicketlistguid, _id));
@@ -322,7 +322,7 @@ namespace Game.SupportSystem
public override string FormatViewMessageString(CommandHandler handler, bool detailed = false)
{
ulong curTime = (ulong)Time.UnixTime;
ulong curTime = (ulong)GameTime.GetGameTime();
StringBuilder ss = new();
ss.Append(handler.GetParsedString(CypherStrings.CommandTicketlistguid, _id));
@@ -428,7 +428,7 @@ namespace Game.SupportSystem
public override string FormatViewMessageString(CommandHandler handler, bool detailed = false)
{
ulong curTime = (ulong)Time.UnixTime;
ulong curTime = (ulong)GameTime.GetGameTime();
StringBuilder ss = new();
ss.Append(handler.GetParsedString(CypherStrings.CommandTicketlistguid, _id));