feat(Core/GameEvent): Allow unspecified end_time for game events (#2368)

This commit is contained in:
Stoabrogga
2019-11-09 16:12:48 +01:00
committed by Francesco Borzì
parent e83169d715
commit 42a53837c6
2 changed files with 15 additions and 0 deletions

View File

@@ -235,6 +235,8 @@ void GameEventMgr::LoadFromDB()
uint64 starttime = fields[1].GetUInt64();
pGameEvent.start = time_t(starttime);
uint64 endtime = fields[2].GetUInt64();
if (fields[2].IsNull())
endtime = time(nullptr) + 63072000; // add 2 years to current date
pGameEvent.end = time_t(endtime);
pGameEvent.occurence = fields[3].GetUInt64();
pGameEvent.length = fields[4].GetUInt64();