Vanilla/Turtle WoW support: M2 loading, bone parsing, textures, auth

- Vanilla M2 bone struct (108 bytes) with 28-byte animation tracks
- Version-aware bone parsing (vanilla vs WotLK format detection)
- Fix CharSections.dbc field layout for vanilla (variation/color at 4-5)
- Remove broken CharSections.csv files (all fields marked as strings)
- Expansion data reload on profile switch (DBC cache clear, layout reload)
- Vanilla packet encryption (VanillaCrypt XOR-based header crypt)
- Extended character preview geoset range (0-99) for vanilla models
- DBC cache clear support in AssetManager
This commit is contained in:
Kelsi 2026-02-13 16:53:28 -08:00
parent 6729f66a37
commit 430c2bdcfa
34 changed files with 1066 additions and 24795 deletions

View file

@ -246,15 +246,17 @@ size_t TCPSocket::getExpectedPacketSize(uint8_t opcode) {
return 0; // Need more data to determine
case 0x01: // LOGON_PROOF response
// Success: opcode(1) + status(1) + M2(20) + accountFlags(4) + surveyId(4) + loginFlags(2) = 32
// Some vanilla-era servers send a shorter success response:
// opcode(1) + status(1) + M2(20) = 22
// Success response varies by server build (determined by client build sent in challenge):
// Build >= 8089: cmd(1)+error(1)+M2(20)+accountFlags(4)+surveyId(4)+loginFlags(2) = 32
// Build 6299-8088: cmd(1)+error(1)+M2(20)+surveyId(4)+loginFlags(2) = 28
// Build < 6299: cmd(1)+error(1)+M2(20)+surveyId(4) = 26
// Failure: varies by server — minimum 2 bytes (opcode + status), some send 4
if (receiveBuffer.size() >= 2) {
uint8_t status = receiveBuffer[1];
if (status == 0x00) {
if (receiveBuffer.size() >= 32) return 32; // WotLK-style
if (receiveBuffer.size() >= 22) return 22; // minimal/vanilla-style
if (receiveBuffer.size() >= 32) return 32;
if (receiveBuffer.size() >= 28) return 28;
if (receiveBuffer.size() >= 26) return 26;
return 0;
} else {
// Consume up to 4 bytes if available, minimum 2