Jump to content

[Bug & possible fix] Inaccurate respawn time.


Recommended Posts

Posted

Hi, I noticed today that creatures with low respawn time will never respawn at low respawn time - I investigated.

It seems server always adds CORPSE remove delay to respawn time - is this intended? or by accident?

For example, a world boss with 1 hour respawn time will _ALWAYS_ have another 3600 minutes added to its total respawn time. (if config has 3600)

look:

void Creature::setDeathState(DeathState s)

{

if ((s == JUST_DIED && !m_isDeadByDefault) || (s == JUST_ALIVED && m_isDeadByDefault))

{

m_deathTimer = m_corpseDelay*IN_MILLISECONDS;

// always save boss respawn time at death to prevent crash cheating

if (sWorld.getConfig(CONFIG_BOOL_SAVE_RESPAWN_TIME_IMMEDIATLY) || isWorldBoss())

SaveRespawnTime();

should rather be something like

void Creature::setDeathState(DeathState s)

{

if ((s == JUST_DIED && !m_isDeadByDefault) || (s == JUST_ALIVED && m_isDeadByDefault))

{

int deathTimer = m_corpseDelay >= m_respawnDelay ? m_respawnDelay : m_corpseDelay;

m_deathTimer = deathTimer*IN_MILLISECONDS;

// always save boss respawn time at death to prevent crash cheating

if (sWorld.getConfig(CONFIG_BOOL_SAVE_RESPAWN_TIME_IMMEDIATLY) || isWorldBoss())

SaveRespawnTime();

Otherwise _real_ respawn time is incorrect.

  • 3 weeks later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use