mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-15 13:35:08 +00:00
fix(Core/Players): Fixed getting resting exp in cities/inns. (#8020)
Fixes #7939
This commit is contained in:
@@ -103,6 +103,7 @@ void Player::Update(uint32 p_time)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time_t lastTick = m_Last_tick;
|
||||||
if (now > m_Last_tick)
|
if (now > m_Last_tick)
|
||||||
{
|
{
|
||||||
// Update items that have just a limited lifetime
|
// 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 (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 currTime = time(nullptr);
|
||||||
time_t timeDiff = currTime - _restTime;
|
time_t timeDiff = currTime - _restTime;
|
||||||
|
|||||||
Reference in New Issue
Block a user