Core/Misc: Replace time(NULL) with GameTime::GetGameTime()

This commit is contained in:
jackpoz
2017-12-10 12:39:37 +01:00
parent 3a536260f8
commit 12701cb0c6
62 changed files with 321 additions and 243 deletions

View File

@@ -24,6 +24,7 @@
#include "DynamicObject.h"
#include "Log.h"
#include "GameObject.h"
#include "GameTime.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "World.h"
@@ -143,7 +144,7 @@ void LoadHelper(CellGuidSet const& guid_set, CellCoord &cell, GridRefManager<T>
// If script is blocking spawn, don't spawn but queue for a re-check in a little bit
if (!(group->flags & SPAWNGROUP_FLAG_COMPATIBILITY_MODE) && !sScriptMgr->CanSpawn(guid, cdata->id, cdata, map))
{
map->SaveRespawnTime(SPAWN_TYPE_CREATURE, guid, cdata->id, time(nullptr) + urand(4,7), map->GetZoneId(cdata->spawnPoint), Trinity::ComputeGridCoord(cdata->spawnPoint.GetPositionX(), cdata->spawnPoint.GetPositionY()).GetId(), false);
map->SaveRespawnTime(SPAWN_TYPE_CREATURE, guid, cdata->id, GameTime::GetGameTime() + urand(4,7), map->GetZoneId(cdata->spawnPoint), Trinity::ComputeGridCoord(cdata->spawnPoint.GetPositionX(), cdata->spawnPoint.GetPositionY()).GetId(), false);
delete obj;
continue;
}