Core/Items: Fixed soulbound tradeable items not being properly update once every second (#29416)

In the current code they were updated only if the difftime went above 1 second.
This commit is contained in:
Kelno authored and Ovahlord committed 2023-12-04 22:09:52 +01:00
1 parent 10ff84361a
commit b4f6bee92c
1 file changed
+3 -4
+3 -4
View File
@@ -990,13 +990,12 @@ void Player::Update(uint32 p_time)
Unit::AIUpdateTick(p_time);
// Update items that have just a limited lifetime
// Once per second, update items that have just a limited lifetime
if (now > m_Last_tick)
{
UpdateItemDuration(uint32(now - m_Last_tick));
// check every second
if (now > m_Last_tick + 1)
UpdateSoulboundTradeItems();
}
// If mute expired, remove it from the DB
if (GetSession()->m_muteTime && GetSession()->m_muteTime < now)