diff options
author | jackpoz <giacomopoz@gmail.com> | 2017-12-10 12:39:37 +0100 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2017-12-24 22:50:59 +0100 |
commit | 12701cb0c6c45eb105ad449eb9a56e76d84d691e (patch) | |
tree | 9c1cded0812cddb9f7daccac81ba434a413dd0f6 /src/server/game/Grids/ObjectGridLoader.cpp | |
parent | 3a536260f8cd6565726bf82e56dcb58b513b6331 (diff) |
Core/Misc: Replace time(NULL) with GameTime::GetGameTime()
Diffstat (limited to 'src/server/game/Grids/ObjectGridLoader.cpp')
-rw-r--r-- | src/server/game/Grids/ObjectGridLoader.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp index 080f43ad8e4..6b2c6c0f24f 100644 --- a/src/server/game/Grids/ObjectGridLoader.cpp +++ b/src/server/game/Grids/ObjectGridLoader.cpp @@ -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; } |