Revert "feat(core): Ensure that all actions are compared to fixed point in time (#1236) (#1458)" (#1471)
This reverts commit 51b8773528.
This commit is contained in:
parent
23e7ae6a2f
commit
c15206fc15
108 changed files with 509 additions and 933 deletions
|
|
@ -12,7 +12,6 @@
|
|||
#include "MapManager.h"
|
||||
#include "MapRefManager.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "GameTime.h"
|
||||
#include "Pet.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
|
@ -44,7 +43,7 @@ void Map::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, O
|
|||
sa.ownerGUID = ownerGUID;
|
||||
|
||||
sa.script = &iter->second;
|
||||
m_scriptSchedule.insert(ScriptScheduleMap::value_type(time_t(GameTime::GetGameTime() + iter->first), sa));
|
||||
m_scriptSchedule.insert(ScriptScheduleMap::value_type(time_t(sWorld->GetGameTime() + iter->first), sa));
|
||||
if (iter->first == 0)
|
||||
immedScript = true;
|
||||
|
||||
|
|
@ -74,7 +73,7 @@ void Map::ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* sou
|
|||
sa.ownerGUID = ownerGUID;
|
||||
|
||||
sa.script = &script;
|
||||
m_scriptSchedule.insert(ScriptScheduleMap::value_type(time_t(GameTime::GetGameTime() + delay), sa));
|
||||
m_scriptSchedule.insert(ScriptScheduleMap::value_type(time_t(sWorld->GetGameTime() + delay), sa));
|
||||
|
||||
sScriptMgr->IncreaseScheduledScriptsCount();
|
||||
|
||||
|
|
@ -281,7 +280,7 @@ void Map::ScriptsProcess()
|
|||
///- Process overdue queued scripts
|
||||
ScriptScheduleMap::iterator iter = m_scriptSchedule.begin();
|
||||
// ok as multimap is a *sorted* associative container
|
||||
while (!m_scriptSchedule.empty() && (iter->first <= GameTime::GetGameTime()))
|
||||
while (!m_scriptSchedule.empty() && (iter->first <= sWorld->GetGameTime()))
|
||||
{
|
||||
ScriptAction const& step = iter->second;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue