mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix CharSections DBC layout and Warden SHA1 hash computation
CharSections fields were mapped incorrectly (Variation/Color at 4-5, textures at 6-8) — corrected to textures at 4-6, Flags at 7, Variation at 8, Color at 9. Fixed in both dbc_layout.cpp and all expansion JSON configs. Also fix Warden HASH_REQUEST to SHA1 over seed+moduleImage instead of just seed.
This commit is contained in:
parent
c2467cf2fc
commit
0ef4af9c99
6 changed files with 17 additions and 12 deletions
|
|
@ -12,8 +12,8 @@
|
|||
},
|
||||
"CharSections": {
|
||||
"RaceID": 1, "SexID": 2, "BaseSection": 3,
|
||||
"VariationIndex": 4, "ColorIndex": 5,
|
||||
"Texture1": 6, "Texture2": 7, "Texture3": 8
|
||||
"Texture1": 4, "Texture2": 5, "Texture3": 6,
|
||||
"Flags": 7, "VariationIndex": 8, "ColorIndex": 9
|
||||
},
|
||||
"SpellIcon": { "ID": 0, "Path": 1 },
|
||||
"FactionTemplate": {
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
},
|
||||
"CharSections": {
|
||||
"RaceID": 1, "SexID": 2, "BaseSection": 3,
|
||||
"VariationIndex": 4, "ColorIndex": 5,
|
||||
"Texture1": 6, "Texture2": 7, "Texture3": 8
|
||||
"Texture1": 4, "Texture2": 5, "Texture3": 6,
|
||||
"Flags": 7, "VariationIndex": 8, "ColorIndex": 9
|
||||
},
|
||||
"SpellIcon": { "ID": 0, "Path": 1 },
|
||||
"FactionTemplate": {
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
},
|
||||
"CharSections": {
|
||||
"RaceID": 1, "SexID": 2, "BaseSection": 3,
|
||||
"VariationIndex": 4, "ColorIndex": 5,
|
||||
"Texture1": 6, "Texture2": 7, "Texture3": 8
|
||||
"Texture1": 4, "Texture2": 5, "Texture3": 6,
|
||||
"Flags": 7, "VariationIndex": 8, "ColorIndex": 9
|
||||
},
|
||||
"SpellIcon": { "ID": 0, "Path": 1 },
|
||||
"FactionTemplate": {
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
},
|
||||
"CharSections": {
|
||||
"RaceID": 1, "SexID": 2, "BaseSection": 3,
|
||||
"VariationIndex": 4, "ColorIndex": 5,
|
||||
"Texture1": 6, "Texture2": 7, "Texture3": 8
|
||||
"Texture1": 4, "Texture2": 5, "Texture3": 6,
|
||||
"Flags": 7, "VariationIndex": 8, "ColorIndex": 9
|
||||
},
|
||||
"SpellIcon": { "ID": 0, "Path": 1 },
|
||||
"FactionTemplate": {
|
||||
|
|
|
|||
|
|
@ -2281,9 +2281,13 @@ void GameHandler::handleWardenData(network::Packet& packet) {
|
|||
break;
|
||||
}
|
||||
|
||||
// SHA1 fallback (unlikely to work for vanilla modules, but log for debugging)
|
||||
// SHA1(seed + moduleImage) — the server verifies this against its own copy
|
||||
{
|
||||
auto hash = auth::Crypto::sha1(seed);
|
||||
std::vector<uint8_t> hashInput;
|
||||
hashInput.insert(hashInput.end(), seed.begin(), seed.end());
|
||||
hashInput.insert(hashInput.end(), wardenModuleData_.begin(), wardenModuleData_.end());
|
||||
auto hash = auth::Crypto::sha1(hashInput);
|
||||
LOG_INFO("Warden: SHA1 fallback hash over ", hashInput.size(), " bytes (seed+module)");
|
||||
std::vector<uint8_t> resp;
|
||||
resp.push_back(0x04);
|
||||
resp.insert(resp.end(), hash.begin(), hash.end());
|
||||
|
|
|
|||
|
|
@ -23,9 +23,10 @@ void DBCLayout::loadWotlkDefaults() {
|
|||
{ "InventoryIcon", 5 }, { "GeosetGroup1", 7 }, { "GeosetGroup3", 9 }}};
|
||||
|
||||
// CharSections.dbc
|
||||
// Binary layout: ID(0) Race(1) Sex(2) Section(3) Tex1(4) Tex2(5) Tex3(6) Flags(7) Variation(8) Color(9)
|
||||
layouts_["CharSections"] = {{{ "RaceID", 1 }, { "SexID", 2 }, { "BaseSection", 3 },
|
||||
{ "VariationIndex", 4 }, { "ColorIndex", 5 },
|
||||
{ "Texture1", 6 }, { "Texture2", 7 }, { "Texture3", 8 }}};
|
||||
{ "Texture1", 4 }, { "Texture2", 5 }, { "Texture3", 6 },
|
||||
{ "Flags", 7 }, { "VariationIndex", 8 }, { "ColorIndex", 9 }}};
|
||||
|
||||
// SpellIcon.dbc (Icon.dbc in code but actually SpellIcon)
|
||||
layouts_["SpellIcon"] = {{{ "ID", 0 }, { "Path", 1 }}};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue