mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
*Fix a bug about corpse reclaim delay timer.
--HG-- branch : trunk
This commit is contained in:
@@ -18792,7 +18792,8 @@ uint32 Player::GetCorpseReclaimDelay(bool pvp) const
|
||||
|
||||
time_t now = time(NULL);
|
||||
// 0..2 full period
|
||||
uint32 count = (now < m_deathExpireTime) ? (m_deathExpireTime - now)/DEATH_EXPIRE_STEP : 0;
|
||||
// should be ceil(x)-1 but not floor(x)
|
||||
uint32 count = (now < m_deathExpireTime - 1) ? (m_deathExpireTime - 1 - now)/DEATH_EXPIRE_STEP : 0;
|
||||
return copseReclaimDelay[count];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user