mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 16:10:14 +00:00
Add character creation screen with race/class/appearance customization
Implements a full character creation UI integrated into the existing flow. In single-player mode, auth screen now goes to character creation before entering the world. In online mode, a "Create Character" button on the character selection screen sends CMSG_CHAR_CREATE to the server. Includes WoW 3.3.5a race/class combo validation and appearance range limits.
This commit is contained in:
parent
f19c060078
commit
cf54db4554
16 changed files with 611 additions and 30 deletions
|
|
@ -202,6 +202,35 @@ const char* getAuthResultString(AuthResult result) {
|
|||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Character Creation
|
||||
// ============================================================
|
||||
|
||||
network::Packet CharCreatePacket::build(const CharCreateData& data) {
|
||||
network::Packet packet(static_cast<uint16_t>(Opcode::CMSG_CHAR_CREATE));
|
||||
|
||||
packet.writeString(data.name); // null-terminated name
|
||||
packet.writeUInt8(static_cast<uint8_t>(data.race));
|
||||
packet.writeUInt8(static_cast<uint8_t>(data.characterClass));
|
||||
packet.writeUInt8(static_cast<uint8_t>(data.gender));
|
||||
packet.writeUInt8(data.skin);
|
||||
packet.writeUInt8(data.face);
|
||||
packet.writeUInt8(data.hairStyle);
|
||||
packet.writeUInt8(data.hairColor);
|
||||
packet.writeUInt8(data.facialHair);
|
||||
packet.writeUInt8(0); // outfitId, always 0
|
||||
|
||||
LOG_DEBUG("Built CMSG_CHAR_CREATE: name=", data.name);
|
||||
|
||||
return packet;
|
||||
}
|
||||
|
||||
bool CharCreateResponseParser::parse(network::Packet& packet, CharCreateResponseData& data) {
|
||||
data.result = static_cast<CharCreateResult>(packet.readUInt8());
|
||||
LOG_INFO("SMSG_CHAR_CREATE result: ", static_cast<int>(data.result));
|
||||
return true;
|
||||
}
|
||||
|
||||
network::Packet CharEnumPacket::build() {
|
||||
// CMSG_CHAR_ENUM has no body - just the opcode
|
||||
network::Packet packet(static_cast<uint16_t>(Opcode::CMSG_CHAR_ENUM));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue