diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp index eb4303b23..57c8a7160 100644 --- a/src/game/ItemHandler.cpp +++ b/src/game/ItemHandler.cpp @@ -418,7 +418,7 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data ) data << pProto->PageMaterial; data << pProto->StartQuest; data << pProto->LockID; - data << pProto->Material; + data << int32(pProto->Material); data << pProto->Sheath; data << pProto->RandomProperty; data << pProto->RandomSuffix; diff --git a/src/game/ItemPrototype.h b/src/game/ItemPrototype.h index a4c0bb96e..a83456f68 100644 --- a/src/game/ItemPrototype.h +++ b/src/game/ItemPrototype.h @@ -535,7 +535,7 @@ struct ItemPrototype uint32 PageMaterial; uint32 StartQuest; // id from QuestCache.wdb uint32 LockID; - uint32 Material; // id from Material.dbc + int32 Material; // id from Material.dbc uint32 Sheath; uint32 RandomProperty; // id from ItemRandomProperties.dbc uint32 RandomSuffix; // id from ItemRandomSuffix.dbc diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 521c0d387..7387d8736 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -1598,11 +1598,14 @@ void ObjectMgr::LoadItemPrototypes() if(dbcitem) { + /* disabled: have some strange wrong cases for Class/Subclass values. + for enable also uncomment Class/Sublcas fields in ItemEntry structure and in Itemfmt[] if(proto->Class != dbcitem->Class || proto->SubClass != dbcitem->SubClass) { sLog.outErrorDb("Item (Entry: %u) not correct (Class: %u, Sub: %u) pair, must be (Class: %u, Sub: %u) (still using DB value).",i,proto->Class,proto->SubClass,dbcitem->Class,dbcitem->SubClass); // It safe let use Class/Subclass from DB } + */ if(proto->Unk0 != dbcitem->Unk0) { @@ -1612,7 +1615,7 @@ void ObjectMgr::LoadItemPrototypes() if(proto->Material != dbcitem->Material) { - sLog.outErrorDb("Item (Entry: %u) not correct %u material, must be %u (still using DB value).",i,proto->Material,dbcitem->Material); + sLog.outErrorDb("Item (Entry: %u) not correct %i material, must be %i (still using DB value).",i,proto->Material,dbcitem->Material); // It safe let use Material from DB } diff --git a/src/shared/Database/DBCStructure.h b/src/shared/Database/DBCStructure.h index bbd7fc475..6e4170d6f 100644 --- a/src/shared/Database/DBCStructure.h +++ b/src/shared/Database/DBCStructure.h @@ -808,14 +808,14 @@ struct GtRegenMPPerSptEntry struct ItemEntry { - uint32 ID; - uint32 Class; - uint32 SubClass; - uint32 Unk0; - uint32 Material; - uint32 DisplayId; - uint32 InventoryType; - uint32 Sheath; + uint32 ID; // 0 + //uint32 Class; // 1 + //uint32 SubClass; // 2 + uint32 Unk0; // 3 + int32 Material; // 4 + uint32 DisplayId; // 5 + uint32 InventoryType; // 6 + uint32 Sheath; // 7 }; struct ItemDisplayInfoEntry diff --git a/src/shared/Database/DBCfmt.cpp b/src/shared/Database/DBCfmt.cpp index fdadc8173..a646ef41f 100644 --- a/src/shared/Database/DBCfmt.cpp +++ b/src/shared/Database/DBCfmt.cpp @@ -51,7 +51,7 @@ const char GtOCTRegenHPfmt[]="f"; //const char GtOCTRegenMPfmt[]="f"; const char GtRegenHPPerSptfmt[]="f"; const char GtRegenMPPerSptfmt[]="f"; -const char Itemfmt[]="niiiiiii"; +const char Itemfmt[]="nxxiiiii"; //const char ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx"; //const char ItemCondExtCostsEntryfmt[]="xiii"; const char ItemExtendedCostEntryfmt[]="niiiiiiiiiiiiix"; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index b3d863416..627a3188c 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 "7086" + #define REVISION_NR "7087" #endif // __REVISION_NR_H__