From 19537179cbd7c4a0338bf48880f24d8e2f7f4b4b Mon Sep 17 00:00:00 2001 From: mostlikely4r Date: Mon, 5 Jun 2023 14:33:50 +0200 Subject: [PATCH] Prevent unneeded item_instance update when loading from db. --- src/game/Entities/Item.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/game/Entities/Item.cpp b/src/game/Entities/Item.cpp index 9ecbc72773..90c112cc24 100644 --- a/src/game/Entities/Item.cpp +++ b/src/game/Entities/Item.cpp @@ -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) {