Core/Creatures: merged some minor respawn standards

This commit is contained in:
Ovahlord
2018-08-29 06:26:31 +02:00
parent 66d5321780
commit 416e6b36ba
2 changed files with 2 additions and 2 deletions

View File

@@ -1998,7 +1998,7 @@ void Creature::ForcedDespawn(uint32 timeMSToDespawn, Seconds forceRespawnTimer)
void Creature::DespawnOrUnsummon(uint32 msTimeToDespawn /*= 0*/, Seconds forceRespawnTimer /*= 0*/)
{
if (TempSummon* summon = this->ToTempSummon())
if (TempSummon* summon = ToTempSummon())
summon->UnSummon(msTimeToDespawn);
else
ForcedDespawn(msTimeToDespawn, forceRespawnTimer);

View File

@@ -3031,7 +3031,7 @@ bool Map::CheckRespawn(RespawnInfo* info)
ObjectGuid thisGUID = ObjectGuid((info->type == SPAWN_TYPE_GAMEOBJECT) ? HighGuid::GameObject : HighGuid::Unit, info->entry, info->spawnId);
if (time_t linkedTime = GetLinkedRespawnTime(thisGUID))
{
time_t now = time(NULL);
time_t now = GameTime::GetGameTime();
time_t respawnTime;
if (linkedTime == std::numeric_limits<time_t>::max())
respawnTime = linkedTime;