fix(Core/Players): Fixed getting resting exp in cities/inns. (#8020)

Fixes #7939
This commit is contained in:
UltraNix
2021-10-01 10:50:36 +02:00
committed by GitHub
parent 0c8fb1ea73
commit cff7cc58ff

View File

@@ -103,6 +103,7 @@ void Player::Update(uint32 p_time)
}
}
time_t lastTick = m_Last_tick;
if (now > m_Last_tick)
{
// Update items that have just a limited lifetime
@@ -231,7 +232,7 @@ void Player::Update(uint32 p_time)
if (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING))
{
if (now > m_Last_tick && _restTime > 0) // freeze update
if (now > lastTick && _restTime > 0) // freeze update
{
time_t currTime = time(nullptr);
time_t timeDiff = currTime - _restTime;