Small update to creature respawn - by Iskander

--HG--
branch : trunk
This commit is contained in:
raczman
2009-04-14 14:43:28 +02:00
parent a712170758
commit def6071b8f
+2 -2
View File
@@ -422,7 +422,7 @@ void Creature::Update(uint32 diff)
if(targetGuid == m_DBTableGuid) // if linking self, never respawn (check delayed to next day)
SetRespawnTime(DAY);
else
m_respawnTime = GetLinkedCreatureRespawnTime()+urand(5,MINUTE); // else copy time from master and add a little
m_respawnTime = MAX(time(NULL),GetLinkedCreatureRespawnTime())+urand(5,MINUTE); // else copy time from master and add a little
SaveRespawnTime(); // also save to DB immediately
}
else
@@ -2365,4 +2365,4 @@ time_t Creature::GetLinkedCreatureRespawnTime() const
}
return 0;
}
}