Core/ItemTemplate:
Rename unk0 column. Weapons have special sounds on impact. This column is used to override these sounds by specifying another subclass. For example an item with misc subclass can sound like a stave on impact by overriding the subclass here.
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `item_template` CHANGE unk0 SoundOverrideSubclass tinyint(3) NOT NULL DEFAULT '-1';
|
||||||
@@ -1092,7 +1092,7 @@ struct ItemEntry
|
|||||||
uint32 ID; // 0
|
uint32 ID; // 0
|
||||||
uint32 Class; // 1
|
uint32 Class; // 1
|
||||||
uint32 SubClass; // 2 some items have strange subclasses
|
uint32 SubClass; // 2 some items have strange subclasses
|
||||||
int32 Unk0; // 3
|
int32 SoundOverrideSubclass; // 3
|
||||||
int32 Material; // 4
|
int32 Material; // 4
|
||||||
uint32 DisplayId; // 5
|
uint32 DisplayId; // 5
|
||||||
uint32 InventoryType; // 6
|
uint32 InventoryType; // 6
|
||||||
|
|||||||
@@ -588,7 +588,7 @@ struct ItemTemplate
|
|||||||
uint32 ItemId;
|
uint32 ItemId;
|
||||||
uint32 Class; // id from ItemClass.dbc
|
uint32 Class; // id from ItemClass.dbc
|
||||||
uint32 SubClass; // id from ItemSubClass.dbc
|
uint32 SubClass; // id from ItemSubClass.dbc
|
||||||
int32 Unk0;
|
int32 SoundOverrideSubclass; // < 0: id from ItemSubClass.dbc, used to override weapon sound from actual SubClass
|
||||||
std::string Name1;
|
std::string Name1;
|
||||||
uint32 DisplayInfoID; // id from ItemDisplayInfo.dbc
|
uint32 DisplayInfoID; // id from ItemDisplayInfo.dbc
|
||||||
uint32 Quality;
|
uint32 Quality;
|
||||||
|
|||||||
@@ -2002,7 +2002,7 @@ void ObjectMgr::LoadItemTemplates()
|
|||||||
uint32 oldMSTime = getMSTime();
|
uint32 oldMSTime = getMSTime();
|
||||||
|
|
||||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12
|
||||||
QueryResult result = WorldDatabase.Query("SELECT entry, class, subclass, unk0, name, displayid, Quality, Flags, FlagsExtra, BuyCount, BuyPrice, SellPrice, InventoryType, "
|
QueryResult result = WorldDatabase.Query("SELECT entry, class, subclass, SoundOverrideSubclass, name, displayid, Quality, Flags, FlagsExtra, BuyCount, BuyPrice, SellPrice, InventoryType, "
|
||||||
// 13 14 15 16 17 18 19 20
|
// 13 14 15 16 17 18 19 20
|
||||||
"AllowableClass, AllowableRace, ItemLevel, RequiredLevel, RequiredSkill, RequiredSkillRank, requiredspell, requiredhonorrank, "
|
"AllowableClass, AllowableRace, ItemLevel, RequiredLevel, RequiredSkill, RequiredSkillRank, requiredspell, requiredhonorrank, "
|
||||||
// 21 22 23 24 25 26 27 28
|
// 21 22 23 24 25 26 27 28
|
||||||
@@ -2055,7 +2055,7 @@ void ObjectMgr::LoadItemTemplates()
|
|||||||
itemTemplate.ItemId = entry;
|
itemTemplate.ItemId = entry;
|
||||||
itemTemplate.Class = uint32(fields[1].GetUInt8());
|
itemTemplate.Class = uint32(fields[1].GetUInt8());
|
||||||
itemTemplate.SubClass = uint32(fields[2].GetUInt8());
|
itemTemplate.SubClass = uint32(fields[2].GetUInt8());
|
||||||
itemTemplate.Unk0 = fields[3].GetInt32();
|
itemTemplate.SoundOverrideSubclass = int32(fields[3].GetInt8());
|
||||||
itemTemplate.Name1 = fields[4].GetString();
|
itemTemplate.Name1 = fields[4].GetString();
|
||||||
itemTemplate.DisplayInfoID = fields[5].GetUInt32();
|
itemTemplate.DisplayInfoID = fields[5].GetUInt32();
|
||||||
itemTemplate.Quality = uint32(fields[6].GetUInt8());
|
itemTemplate.Quality = uint32(fields[6].GetUInt8());
|
||||||
@@ -2171,11 +2171,11 @@ void ObjectMgr::LoadItemTemplates()
|
|||||||
itemTemplate.Class = dbcitem->Class;
|
itemTemplate.Class = dbcitem->Class;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemTemplate.Unk0 != dbcitem->Unk0)
|
if (itemTemplate.SoundOverrideSubclass != dbcitem->SoundOverrideSubclass)
|
||||||
{
|
{
|
||||||
sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct Unk0 (%i), must be %i .", entry, itemTemplate.Unk0, dbcitem->Unk0);
|
sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct Unk0 (%i), must be %i .", entry, itemTemplate.SoundOverrideSubclass, dbcitem->SoundOverrideSubclass);
|
||||||
if (enforceDBCAttributes)
|
if (enforceDBCAttributes)
|
||||||
itemTemplate.Unk0 = dbcitem->Unk0;
|
itemTemplate.SoundOverrideSubclass = dbcitem->SoundOverrideSubclass;
|
||||||
}
|
}
|
||||||
if (itemTemplate.Material != dbcitem->Material)
|
if (itemTemplate.Material != dbcitem->Material)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data)
|
|||||||
data << pProto->ItemId;
|
data << pProto->ItemId;
|
||||||
data << pProto->Class;
|
data << pProto->Class;
|
||||||
data << pProto->SubClass;
|
data << pProto->SubClass;
|
||||||
data << int32(pProto->Unk0); // new 2.0.3, not exist in wdb cache?
|
data << pProto->SoundOverrideSubclass;
|
||||||
data << Name;
|
data << Name;
|
||||||
data << uint8(0x00); //pProto->Name2; // blizz not send name there, just uint8(0x00); <-- \0 = empty string = empty name...
|
data << uint8(0x00); //pProto->Name2; // blizz not send name there, just uint8(0x00); <-- \0 = empty string = empty name...
|
||||||
data << uint8(0x00); //pProto->Name3; // blizz not send name there, just uint8(0x00);
|
data << uint8(0x00); //pProto->Name3; // blizz not send name there, just uint8(0x00);
|
||||||
|
|||||||
Reference in New Issue
Block a user