Core/Misc: Replace Time.UnixTime with GameTime.GetGameTime()
Port From (https://github.com/TrinityCore/TrinityCore/commit/e17e4e6f0700c7d950e1b2654c217ec8b28ae79e)
This commit is contained in:
@@ -98,12 +98,12 @@ namespace Game.BlackMarket
|
||||
|
||||
public uint GetSecondsRemaining()
|
||||
{
|
||||
return (uint)(_secondsRemaining - (Time.UnixTime - Global.BlackMarketMgr.GetLastUpdate()));
|
||||
return (uint)(_secondsRemaining - (GameTime.GetGameTime() - Global.BlackMarketMgr.GetLastUpdate()));
|
||||
}
|
||||
|
||||
long GetExpirationTime()
|
||||
{
|
||||
return Time.UnixTime + GetSecondsRemaining();
|
||||
return GameTime.GetGameTime() + GetSecondsRemaining();
|
||||
}
|
||||
|
||||
public bool IsCompleted()
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Game.BlackMarket
|
||||
return;
|
||||
}
|
||||
|
||||
_lastUpdate = Time.UnixTime; //Set update time before loading
|
||||
_lastUpdate = GameTime.GetGameTime(); //Set update time before loading
|
||||
|
||||
SQLTransaction trans = new();
|
||||
do
|
||||
@@ -100,7 +100,7 @@ namespace Game.BlackMarket
|
||||
public void Update(bool updateTime = false)
|
||||
{
|
||||
SQLTransaction trans = new();
|
||||
long now = Time.UnixTime;
|
||||
long now = GameTime.GetGameTime();
|
||||
foreach (var entry in _auctions.Values)
|
||||
{
|
||||
if (entry.IsCompleted() && entry.GetBidder() != 0)
|
||||
|
||||
Reference in New Issue
Block a user