Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Core/Items: Fixed soulbound tradeable items not being properly update…
Browse files Browse the repository at this point in the history
… once every second (#29416)

In the current code they were updated only if the difftime went above 1 second.
  • Loading branch information
kelno authored and Ovahlord committed Dec 4, 2023
1 parent 10ff843 commit b4f6bee
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b4f6bee

Please sign in to comment.