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

@@ -11,6 +11,7 @@
#include "Map.h"
#include "Player.h"
#include "ObjectAccessor.h"
#include "GameTime.h"
#include "UnitEvents.h"
#include "SpellAuras.h"
#include "SpellMgr.h"
@@ -295,7 +296,7 @@ HostileReference* ThreatContainer::selectNextVictim(Creature* attacker, HostileR
HostileReference* currentRef = NULL;
bool found = false;
bool noPriorityTargetFound = false;
uint32 currTime = sWorld->GetGameTime();
uint32 currTime = GameTime::GetGameTime();
// pussywizard: currentVictim is needed to compare if threat was exceeded by 10%/30% for melee/range targets (only then switching current target)
if (currentVictim)