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:
Kelsi 2026-02-05 14:13:48 -08:00
parent 129bbac9b3
commit 0605d1522d
16 changed files with 611 additions and 30 deletions

View file

@ -2,6 +2,7 @@
#include "network/packet.hpp"
#include "game/opcodes.hpp"
#include "game/character.hpp"
#include "game/entity.hpp"
#include "game/spell_defines.hpp"
#include "game/group_defines.hpp"
@ -167,6 +168,47 @@ public:
static bool parse(network::Packet& packet, CharEnumResponse& response);
};
// ============================================================
// Character Creation
// ============================================================
enum class CharCreateResult : uint8_t {
SUCCESS = 0x00,
ERROR = 0x01,
FAILED = 0x02,
NAME_IN_USE = 0x03,
DISABLED = 0x04,
PVP_TEAMS_VIOLATION = 0x05,
SERVER_LIMIT = 0x06,
ACCOUNT_LIMIT = 0x07,
};
struct CharCreateData {
std::string name;
Race race;
Class characterClass;
Gender gender;
uint8_t skin = 0;
uint8_t face = 0;
uint8_t hairStyle = 0;
uint8_t hairColor = 0;
uint8_t facialHair = 0;
};
class CharCreatePacket {
public:
static network::Packet build(const CharCreateData& data);
};
struct CharCreateResponseData {
CharCreateResult result;
};
class CharCreateResponseParser {
public:
static bool parse(network::Packet& packet, CharCreateResponseData& data);
};
/**
* CMSG_PLAYER_LOGIN packet builder
*