Ensure that all actions are compared to fixed point in time (ie. world update start)

This commit is contained in:
Aokromes committed 2017-04-14 15:02:49 +02:00
1 parent 00babf222a
commit adae2fec26
43 files changed
+479 -185

No files matched your search

+2 -2
View File
@@ -23,7 +23,7 @@
#include "Weather.h"
#include "WorldPacket.h"
#include "Player.h"
#include "World.h"
#include "GameTime.h"
#include "Log.h"
#include "Util.h"
#include "ScriptMgr.h"
@@ -92,7 +92,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;
localtime_r(&gtime, &ltime);
uint32 season = ((ltime.tm_yday - 78 + 365)/91)%4;