mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 12:47:07 +00:00
feat(Core/GameEvent): Allow unspecified end_time for game events (#2368)
This commit is contained in:
committed by
Francesco Borzì
parent
e83169d715
commit
42a53837c6
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user