mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
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:
parent
6729f66a37
commit
430c2bdcfa
34 changed files with 1066 additions and 24795 deletions
|
|
@ -130,7 +130,8 @@ struct RealmListResponse {
|
|||
// REALM_LIST response parser
|
||||
class RealmListResponseParser {
|
||||
public:
|
||||
static bool parse(network::Packet& packet, RealmListResponse& response);
|
||||
// protocolVersion: 3 = vanilla (uint8 realmCount, uint32 icon), 8 = WotLK (uint16 realmCount, uint8 icon)
|
||||
static bool parse(network::Packet& packet, RealmListResponse& response, uint8_t protocolVersion = 8);
|
||||
};
|
||||
|
||||
} // namespace auth
|
||||
|
|
|
|||
58
include/auth/vanilla_crypt.hpp
Normal file
58
include/auth/vanilla_crypt.hpp
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
namespace wowee {
|
||||
namespace auth {
|
||||
|
||||
/**
|
||||
* Vanilla/TBC WoW Header Cipher
|
||||
*
|
||||
* Used for encrypting/decrypting World of Warcraft packet headers
|
||||
* in vanilla (1.x) and TBC (2.x) clients. This is a simple XOR+addition
|
||||
* chaining cipher that uses the raw 40-byte SRP session key directly.
|
||||
*
|
||||
* Algorithm (encrypt):
|
||||
* encrypted = (plaintext ^ key[index]) + previousEncrypted
|
||||
* index = (index + 1) % keyLen
|
||||
*
|
||||
* Algorithm (decrypt):
|
||||
* plaintext = (encrypted - previousEncrypted) ^ key[index]
|
||||
* index = (index + 1) % keyLen
|
||||
*/
|
||||
class VanillaCrypt {
|
||||
public:
|
||||
VanillaCrypt() = default;
|
||||
~VanillaCrypt() = default;
|
||||
|
||||
/**
|
||||
* Initialize the cipher with the raw session key
|
||||
* @param sessionKey 40-byte session key from SRP auth
|
||||
*/
|
||||
void init(const std::vector<uint8_t>& sessionKey);
|
||||
|
||||
/**
|
||||
* Encrypt outgoing header bytes (CMSG: 6 bytes)
|
||||
* @param data Pointer to header data to encrypt in-place
|
||||
* @param length Number of bytes to encrypt
|
||||
*/
|
||||
void encrypt(uint8_t* data, size_t length);
|
||||
|
||||
/**
|
||||
* Decrypt incoming header bytes (SMSG: 4 bytes)
|
||||
* @param data Pointer to header data to decrypt in-place
|
||||
* @param length Number of bytes to decrypt
|
||||
*/
|
||||
void decrypt(uint8_t* data, size_t length);
|
||||
|
||||
private:
|
||||
std::vector<uint8_t> key_;
|
||||
uint8_t sendIndex_ = 0;
|
||||
uint8_t sendPrev_ = 0;
|
||||
uint8_t recvIndex_ = 0;
|
||||
uint8_t recvPrev_ = 0;
|
||||
};
|
||||
|
||||
} // namespace auth
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue