Fix PopStyleVar mismatches and character geoset IDs

Fix 9 PopStyleVar(2) calls that should be PopStyleVar(1) across
player frame, target frame, cast bar, party frames, buff bar, escape
menu, death dialog, and resurrect dialog. Fix action bar from
PopStyleVar(2) to PopStyleVar(4) to match 4 pushes.

Fix character geoset defaults: 301→302 (bare hands), 701→702 (ears),
1501→1502 (back/cloak), add 802 (wristbands). No WoW character model
uses geoset 301/701/1501; all use 302/702/1502 as base. This fixes
missing hands/arms on undead and other races with separate hand meshes.
This commit is contained in:
Kelsi 2026-02-15 06:09:38 -08:00
parent d2b46d410a
commit 7f0eceaacc
3 changed files with 26 additions and 22 deletions

View file

@ -2084,12 +2084,13 @@ void Application::spawnPlayerCharacter() {
activeGeosets.insert(static_cast<uint16_t>(100 + hairStyleId + 1));
// Facial hair geoset: group 2 = 200 + variation + 1
activeGeosets.insert(static_cast<uint16_t>(200 + facialId + 1));
activeGeosets.insert(301); // Gloves: bare hands
activeGeosets.insert(302); // Gloves: bare hands
activeGeosets.insert(401); // Boots: bare feet
activeGeosets.insert(501); // Chest: bare
activeGeosets.insert(701); // Ears: default
activeGeosets.insert(702); // Ears: default
activeGeosets.insert(802); // Wristbands: default
activeGeosets.insert(1301); // Trousers: bare legs
activeGeosets.insert(1501); // Back body (cloak=none)
activeGeosets.insert(1502); // Back body (cloak=none)
// 1703 = DK eye glow mesh — skip for normal characters
// Normal eyes are part of the face texture on the body mesh
charRenderer->setActiveGeosets(instanceId, activeGeosets);
@ -3317,11 +3318,11 @@ void Application::spawnOnlineCreature(uint64_t guid, uint32_t displayId, float x
}
// Default equipment geosets (bare/no armor)
uint16_t geosetGloves = 301; // Bare hands
uint16_t geosetGloves = 302; // Bare hands
uint16_t geosetBoots = 401; // Bare feet
uint16_t geosetChest = 501; // Bare chest
uint16_t geosetPants = 1301; // Bare legs
uint16_t geosetCape = 1501; // No cape
uint16_t geosetCape = 1502; // No cape
uint16_t geosetTabard = 1201; // No tabard
// Load equipment geosets from ItemDisplayInfo.dbc
@ -3398,7 +3399,8 @@ void Application::spawnOnlineCreature(uint64_t guid, uint32_t displayId, float x
activeGeosets.insert(geosetPants);
activeGeosets.insert(geosetCape);
activeGeosets.insert(geosetTabard);
activeGeosets.insert(701); // Ears: default
activeGeosets.insert(702); // Ears: default
activeGeosets.insert(802); // Wristbands: default
// Hide hair under helmets: replace style-specific scalp with bald scalp
if (extra.equipDisplayId[0] != 0 && hairGeoset > 1) {
@ -3809,12 +3811,13 @@ void Application::spawnOnlinePlayer(uint64_t guid,
for (uint16_t i = 0; i <= 18; i++) activeGeosets.insert(i);
activeGeosets.insert(static_cast<uint16_t>(100 + hairStyleId + 1));
activeGeosets.insert(static_cast<uint16_t>(200 + facialFeatures + 1));
activeGeosets.insert(301);
activeGeosets.insert(302);
activeGeosets.insert(401);
activeGeosets.insert(501);
activeGeosets.insert(701);
activeGeosets.insert(702);
activeGeosets.insert(802);
activeGeosets.insert(1301);
activeGeosets.insert(1501);
activeGeosets.insert(1502);
charRenderer->setActiveGeosets(instanceId, activeGeosets);
charRenderer->playAnimation(instanceId, 0, true);

View file

@ -333,12 +333,13 @@ bool CharacterPreview::loadCharacter(game::Race race, game::Gender gender,
activeGeosets.insert(static_cast<uint16_t>(100 + hairStyle + 1));
// Facial hair geoset: group 2 = 200 + variation + 1
activeGeosets.insert(static_cast<uint16_t>(200 + facialHair + 1));
activeGeosets.insert(301); // Gloves: bare hands
activeGeosets.insert(302); // Gloves: bare hands
activeGeosets.insert(401); // Boots: bare feet
activeGeosets.insert(501); // Chest: bare
activeGeosets.insert(701); // Ears: default
activeGeosets.insert(702); // Ears: default
activeGeosets.insert(802); // Wristbands: default
activeGeosets.insert(1301); // Trousers: bare legs
activeGeosets.insert(1501); // Back body (cloak=none)
activeGeosets.insert(1502); // Back body (cloak=none)
charRenderer_->setActiveGeosets(instanceId_, activeGeosets);
// Play idle animation (Stand = animation ID 0)

View file

@ -1419,7 +1419,7 @@ void GameScreen::renderPlayerFrame(game::GameHandler& gameHandler) {
ImGui::End();
ImGui::PopStyleColor(2);
ImGui::PopStyleVar(2);
ImGui::PopStyleVar();
}
void GameScreen::renderTargetFrame(game::GameHandler& gameHandler) {
@ -1545,7 +1545,7 @@ void GameScreen::renderTargetFrame(game::GameHandler& gameHandler) {
ImGui::End();
ImGui::PopStyleColor(2);
ImGui::PopStyleVar(2);
ImGui::PopStyleVar();
}
void GameScreen::sendChatMessage(game::GameHandler& gameHandler) {
@ -3165,7 +3165,7 @@ void GameScreen::renderActionBar(game::GameHandler& gameHandler) {
ImGui::End();
ImGui::PopStyleColor();
ImGui::PopStyleVar(2);
ImGui::PopStyleVar(4);
// Handle action bar drag: render icon at cursor and detect drop outside
if (actionBarDragSlot_ >= 0) {
@ -3461,7 +3461,7 @@ void GameScreen::renderCastBar(game::GameHandler& gameHandler) {
ImGui::End();
ImGui::PopStyleColor();
ImGui::PopStyleVar(2);
ImGui::PopStyleVar();
}
// ============================================================
@ -3592,7 +3592,7 @@ void GameScreen::renderPartyFrames(game::GameHandler& gameHandler) {
ImGui::End();
ImGui::PopStyleColor();
ImGui::PopStyleVar(2);
ImGui::PopStyleVar();
}
// ============================================================
@ -3816,7 +3816,7 @@ void GameScreen::renderBuffBar(game::GameHandler& gameHandler) {
ImGui::ImageButton("##aura",
(ImTextureID)(uintptr_t)iconTex,
ImVec2(ICON_SIZE - 4, ICON_SIZE - 4));
ImGui::PopStyleVar(2);
ImGui::PopStyleVar();
ImGui::PopStyleColor();
} else {
ImGui::PushStyleColor(ImGuiCol_Button, borderColor);
@ -3862,7 +3862,7 @@ void GameScreen::renderBuffBar(game::GameHandler& gameHandler) {
}
ImGui::End();
ImGui::PopStyleVar(2);
ImGui::PopStyleVar();
ImGui::PopStyleColor();
}
@ -4809,7 +4809,7 @@ void GameScreen::renderEscapeMenu() {
showEscapeMenu = false;
showEscapeSettingsNotice = false;
}
ImGui::PopStyleVar(2);
ImGui::PopStyleVar();
}
ImGui::End();
}
@ -4979,7 +4979,7 @@ void GameScreen::renderDeathScreen(game::GameHandler& gameHandler) {
}
ImGui::End();
ImGui::PopStyleColor(2);
ImGui::PopStyleVar(2);
ImGui::PopStyleVar();
}
void GameScreen::renderResurrectDialog(game::GameHandler& gameHandler) {
@ -5033,7 +5033,7 @@ void GameScreen::renderResurrectDialog(game::GameHandler& gameHandler) {
}
ImGui::End();
ImGui::PopStyleColor(2);
ImGui::PopStyleVar(2);
ImGui::PopStyleVar();
}
// ============================================================