feat(core): Ensure that all actions are compared to fixed point in time (#1236) (#1458)

i.e. world update start
This commit is contained in:
Viste(Кирилл)
2019-02-14 21:22:17 +03:00
committed by Francesco Borzì
parent 1b7522ff0e
commit 51b8773528
108 changed files with 933 additions and 509 deletions

View File

@@ -12,6 +12,7 @@
#include "WorldPacket.h"
#include "Player.h"
#include "World.h"
#include "GameTime.h"
#include "Log.h"
#include "ObjectMgr.h"
#include "Util.h"
@@ -82,7 +83,7 @@ bool Weather::ReGenerate()
//78 days between January 1st and March 20nd; 365/4=91 days by season
// season source http://aa.usno.navy.mil/data/docs/EarthSeasons.html
time_t gtime = sWorld->GetGameTime();
time_t gtime = GameTime::GetGameTime();
struct tm ltime;
ACE_OS::localtime_r(&gtime, &ltime);
uint32 season = ((ltime.tm_yday - 78 + 365)/91)%4;