Core/Misc: Move WorldState enum to SharedDefines

Port From (https://github.com/TrinityCore/TrinityCore/commit/ca62d93481f60807679c8632e09fa6f48f29de68)
This commit is contained in:
hondacrx
2022-02-23 17:01:51 -05:00
parent 3c6e9e7795
commit 628a24923c
8 changed files with 95 additions and 78 deletions
+4 -4
View File
@@ -2116,7 +2116,7 @@ namespace Game
void InitRandomBGResetTime()
{
long bgtime = GetWorldState(WorldStates.BGDailyResetTime);
long bgtime = GetWorldState(WorldStates.BgDailyResetTime);
if (bgtime == 0)
m_NextRandomBGReset = GameTime.GetGameTime(); // game time not yet init
@@ -2134,7 +2134,7 @@ namespace Game
m_NextRandomBGReset = bgtime < curTime ? nextDayResetTime - Time.Day : nextDayResetTime;
if (bgtime == 0)
SetWorldState(WorldStates.BGDailyResetTime, (ulong)m_NextRandomBGReset);
SetWorldState(WorldStates.BgDailyResetTime, (ulong)m_NextRandomBGReset);
}
void InitCalendarOldEventsDeletionTime()
@@ -2230,7 +2230,7 @@ namespace Game
session.GetPlayer().SetRandomWinner(false);
m_NextRandomBGReset += Time.Day;
SetWorldState(WorldStates.BGDailyResetTime, (ulong)m_NextRandomBGReset);
SetWorldState(WorldStates.BgDailyResetTime, (ulong)m_NextRandomBGReset);
}
void CalendarDeleteOldEvents()
@@ -2319,7 +2319,7 @@ namespace Game
Log.outInfo(LogFilter.ServerLoading, "Loaded {0} world states in {1} ms", count, Time.GetMSTimeDiffToNow(oldMSTime));
}
public void SetWorldState(WorldStates index, ulong value)
public void SetWorldState(WorldStates index, object value)
{
SetWorldState((uint)index, value);
}