mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
feat: implement barber shop UI with hair/facial customization
Adds a functional barber shop window triggered by SMSG_ENABLE_BARBER_SHOP. Players can adjust hair style, hair color, and facial features using sliders bounded by race/gender max values. Sends CMSG_ALTER_APPEARANCE on confirm; server result closes the window on success. Escape key also closes the barber shop.
This commit is contained in:
parent
8dfd916fe4
commit
64fd7eddf8
6 changed files with 160 additions and 1 deletions
|
|
@ -2681,8 +2681,8 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
}
|
||||
case Opcode::SMSG_ENABLE_BARBER_SHOP:
|
||||
// Sent by server when player sits in barber chair — triggers barber shop UI
|
||||
// No payload; we don't have barber shop UI yet, so just log
|
||||
LOG_INFO("SMSG_ENABLE_BARBER_SHOP: barber shop available");
|
||||
barberShopOpen_ = true;
|
||||
break;
|
||||
case Opcode::SMSG_FEIGN_DEATH_RESISTED:
|
||||
addUIError("Your Feign Death was resisted.");
|
||||
|
|
@ -4902,6 +4902,7 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
uint32_t result = packet.readUInt32();
|
||||
if (result == 0) {
|
||||
addSystemChatMessage("Hairstyle changed.");
|
||||
barberShopOpen_ = false;
|
||||
} else {
|
||||
const char* msg = (result == 1) ? "Not enough money for new hairstyle."
|
||||
: (result == 2) ? "You are not at a barber shop."
|
||||
|
|
@ -19180,6 +19181,13 @@ void GameHandler::confirmTalentWipe() {
|
|||
talentWipeCost_ = 0;
|
||||
}
|
||||
|
||||
void GameHandler::sendAlterAppearance(uint32_t hairStyle, uint32_t hairColor, uint32_t facialHair) {
|
||||
if (state != WorldState::IN_WORLD || !socket) return;
|
||||
auto pkt = AlterAppearancePacket::build(hairStyle, hairColor, facialHair);
|
||||
socket->send(pkt);
|
||||
LOG_INFO("sendAlterAppearance: hair=", hairStyle, " color=", hairColor, " facial=", facialHair);
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Phase 4: Group/Party
|
||||
// ============================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue