diff options
author | raczman <none@none> | 2009-04-14 14:43:28 +0200 |
---|---|---|
committer | raczman <none@none> | 2009-04-14 14:43:28 +0200 |
commit | def6071b8f15712a0ef5b1afc0b336f73a7d4e62 (patch) | |
tree | 686daff8f600c552eeb554f0ca20412c2d316054 /src | |
parent | a712170758cf1b6c62352e1bede372eae8c96593 (diff) |
Small update to creature respawn - by Iskander
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Creature.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index f8643543038..493f505e327 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -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; -}
\ No newline at end of file +} |