diff --git a/src/game/Item.cpp b/src/game/Item.cpp index 52ed24bdb..0ac47c673 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -377,6 +377,16 @@ bool Item::LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult *result) if(!proto) return false; + // 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; + } + // recalculate suffix factor if(GetItemRandomPropertyId() < 0) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index bc81ad8d7..2e4c90e44 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8093" + #define REVISION_NR "8094" #endif // __REVISION_NR_H__