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 Dec 25, 2023
1 parent 54b538a commit 1953717
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 @@ -444,16 +444,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 1953717

Please sign in to comment.