mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix off-by-one in ItemDisplayInfo texture component fields
Texture regions are at DBC fields 15-22, not 14-21. Field 14 is HelmetGeosetVis[1] (uint32), and getString() on it returned random strings from the DBC string block, causing garbled textures on players and missing leg textures on other characters.
This commit is contained in:
parent
3675721016
commit
148f63cffe
5 changed files with 30 additions and 28 deletions
|
|
@ -6,9 +6,9 @@
|
|||
"ItemDisplayInfo": {
|
||||
"ID": 0, "LeftModel": 1, "LeftModelTexture": 3,
|
||||
"InventoryIcon": 5, "GeosetGroup1": 7, "GeosetGroup3": 9,
|
||||
"TextureArmUpper": 14, "TextureArmLower": 15, "TextureHand": 16,
|
||||
"TextureTorsoUpper": 17, "TextureTorsoLower": 18,
|
||||
"TextureLegUpper": 19, "TextureLegLower": 20, "TextureFoot": 21
|
||||
"TextureArmUpper": 15, "TextureArmLower": 16, "TextureHand": 17,
|
||||
"TextureTorsoUpper": 18, "TextureTorsoLower": 19,
|
||||
"TextureLegUpper": 20, "TextureLegLower": 21, "TextureFoot": 22
|
||||
},
|
||||
"CharSections": {
|
||||
"RaceID": 1, "SexID": 2, "BaseSection": 3,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
"ItemDisplayInfo": {
|
||||
"ID": 0, "LeftModel": 1, "LeftModelTexture": 3,
|
||||
"InventoryIcon": 5, "GeosetGroup1": 7, "GeosetGroup3": 9,
|
||||
"TextureArmUpper": 14, "TextureArmLower": 15, "TextureHand": 16,
|
||||
"TextureTorsoUpper": 17, "TextureTorsoLower": 18,
|
||||
"TextureLegUpper": 19, "TextureLegLower": 20, "TextureFoot": 21
|
||||
"TextureArmUpper": 15, "TextureArmLower": 16, "TextureHand": 17,
|
||||
"TextureTorsoUpper": 18, "TextureTorsoLower": 19,
|
||||
"TextureLegUpper": 20, "TextureLegLower": 21, "TextureFoot": 22
|
||||
},
|
||||
"CharSections": {
|
||||
"RaceID": 1, "SexID": 2, "BaseSection": 3,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
"ItemDisplayInfo": {
|
||||
"ID": 0, "LeftModel": 1, "LeftModelTexture": 3,
|
||||
"InventoryIcon": 5, "GeosetGroup1": 7, "GeosetGroup3": 9,
|
||||
"TextureArmUpper": 14, "TextureArmLower": 15, "TextureHand": 16,
|
||||
"TextureTorsoUpper": 17, "TextureTorsoLower": 18,
|
||||
"TextureLegUpper": 19, "TextureLegLower": 20, "TextureFoot": 21
|
||||
"TextureArmUpper": 15, "TextureArmLower": 16, "TextureHand": 17,
|
||||
"TextureTorsoUpper": 18, "TextureTorsoLower": 19,
|
||||
"TextureLegUpper": 20, "TextureLegLower": 21, "TextureFoot": 22
|
||||
},
|
||||
"CharSections": {
|
||||
"RaceID": 1, "SexID": 2, "BaseSection": 3,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
"ItemDisplayInfo": {
|
||||
"ID": 0, "LeftModel": 1, "LeftModelTexture": 3,
|
||||
"InventoryIcon": 5, "GeosetGroup1": 7, "GeosetGroup3": 9,
|
||||
"TextureArmUpper": 14, "TextureArmLower": 15, "TextureHand": 16,
|
||||
"TextureTorsoUpper": 17, "TextureTorsoLower": 18,
|
||||
"TextureLegUpper": 19, "TextureLegLower": 20, "TextureFoot": 21
|
||||
"TextureArmUpper": 15, "TextureArmLower": 16, "TextureHand": 17,
|
||||
"TextureTorsoUpper": 18, "TextureTorsoLower": 19,
|
||||
"TextureLegUpper": 20, "TextureLegLower": 21, "TextureFoot": 22
|
||||
},
|
||||
"CharSections": {
|
||||
"RaceID": 1, "SexID": 2, "BaseSection": 3,
|
||||
|
|
|
|||
|
|
@ -3130,15 +3130,16 @@ void Application::spawnOnlineCreature(uint64_t guid, uint32_t displayId, float x
|
|||
const auto* idiL = pipeline::getActiveDBCLayout()
|
||||
? pipeline::getActiveDBCLayout()->getLayout("ItemDisplayInfo") : nullptr;
|
||||
// Texture component region fields (8 regions: ArmUpper..Foot)
|
||||
// Fields 15-22 in WotLK ItemDisplayInfo.dbc (field 14 = HelmetGeosetVis[1])
|
||||
const uint32_t texRegionFields[8] = {
|
||||
idiL ? (*idiL)["TextureArmUpper"] : 14u,
|
||||
idiL ? (*idiL)["TextureArmLower"] : 15u,
|
||||
idiL ? (*idiL)["TextureHand"] : 16u,
|
||||
idiL ? (*idiL)["TextureTorsoUpper"]: 17u,
|
||||
idiL ? (*idiL)["TextureTorsoLower"]: 18u,
|
||||
idiL ? (*idiL)["TextureLegUpper"] : 19u,
|
||||
idiL ? (*idiL)["TextureLegLower"] : 20u,
|
||||
idiL ? (*idiL)["TextureFoot"] : 21u,
|
||||
idiL ? (*idiL)["TextureArmUpper"] : 15u,
|
||||
idiL ? (*idiL)["TextureArmLower"] : 16u,
|
||||
idiL ? (*idiL)["TextureHand"] : 17u,
|
||||
idiL ? (*idiL)["TextureTorsoUpper"]: 18u,
|
||||
idiL ? (*idiL)["TextureTorsoLower"]: 19u,
|
||||
idiL ? (*idiL)["TextureLegUpper"] : 20u,
|
||||
idiL ? (*idiL)["TextureLegLower"] : 21u,
|
||||
idiL ? (*idiL)["TextureFoot"] : 22u,
|
||||
};
|
||||
const bool npcIsFemale = (extra.sexId == 1);
|
||||
|
||||
|
|
@ -3969,15 +3970,16 @@ void Application::setOnlinePlayerEquipment(uint64_t guid,
|
|||
};
|
||||
|
||||
// Texture component region fields from DBC layout
|
||||
// Fields 15-22 in WotLK ItemDisplayInfo.dbc (field 14 = HelmetGeosetVis[1])
|
||||
const uint32_t texRegionFields[8] = {
|
||||
idiL ? (*idiL)["TextureArmUpper"] : 14u,
|
||||
idiL ? (*idiL)["TextureArmLower"] : 15u,
|
||||
idiL ? (*idiL)["TextureHand"] : 16u,
|
||||
idiL ? (*idiL)["TextureTorsoUpper"]: 17u,
|
||||
idiL ? (*idiL)["TextureTorsoLower"]: 18u,
|
||||
idiL ? (*idiL)["TextureLegUpper"] : 19u,
|
||||
idiL ? (*idiL)["TextureLegLower"] : 20u,
|
||||
idiL ? (*idiL)["TextureFoot"] : 21u,
|
||||
idiL ? (*idiL)["TextureArmUpper"] : 15u,
|
||||
idiL ? (*idiL)["TextureArmLower"] : 16u,
|
||||
idiL ? (*idiL)["TextureHand"] : 17u,
|
||||
idiL ? (*idiL)["TextureTorsoUpper"]: 18u,
|
||||
idiL ? (*idiL)["TextureTorsoLower"]: 19u,
|
||||
idiL ? (*idiL)["TextureLegUpper"] : 20u,
|
||||
idiL ? (*idiL)["TextureLegLower"] : 21u,
|
||||
idiL ? (*idiL)["TextureFoot"] : 22u,
|
||||
};
|
||||
|
||||
std::vector<std::pair<int, std::string>> regionLayers;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue