Skip to content

Commit

Permalink
Prevent unneeded item_instance update when loading from db.
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlikely4r authored and killerwife committed Jan 8, 2024
1 parent b9ed3be commit 06e56c4
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/game/Entities/Item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,16 +458,6 @@ bool Item::LoadFromDB(uint32 guidLow, Field* fields, ObjectGuid ownerGuid)

SetUInt32Value(ITEM_FIELD_FLAGS, fields[6].GetUInt32());

// update max durability (and durability) if need
if (proto->MaxDurability != GetUInt32Value(ITEM_FIELD_MAXDURABILITY))
{
SetUInt32Value(ITEM_FIELD_MAXDURABILITY, proto->MaxDurability);
if (GetUInt32Value(ITEM_FIELD_DURABILITY) > proto->MaxDurability)
SetUInt32Value(ITEM_FIELD_DURABILITY, proto->MaxDurability);

need_save = true;
}

// Remove bind flag for items vs NO_BIND set
if (IsSoulBound() && proto->Bonding == NO_BIND)
{
Expand Down

0 comments on commit 06e56c4

Please sign in to comment.