mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 00:20:16 +00:00
fix: sync player appearance after barber shop or polymorph
PLAYER_BYTES and PLAYER_BYTES_2 changes in SMSG_UPDATE_OBJECT now update the Character struct's appearanceBytes and facialFeatures, and fire an appearance-changed callback that resets the inventory screen preview so it reloads with the new hair/face values.
This commit is contained in:
parent
2e134b686d
commit
801f29f043
4 changed files with 40 additions and 2 deletions
|
|
@ -401,6 +401,14 @@ void GameScreen::render(game::GameHandler& gameHandler) {
|
|||
ghostStateCallbackSet_ = true;
|
||||
}
|
||||
|
||||
// Set up appearance-changed callback to refresh inventory preview (barber shop, etc.)
|
||||
if (!appearanceCallbackSet_) {
|
||||
gameHandler.setAppearanceChangedCallback([this]() {
|
||||
inventoryScreenCharGuid_ = 0; // force preview re-sync on next frame
|
||||
});
|
||||
appearanceCallbackSet_ = true;
|
||||
}
|
||||
|
||||
// Set up UI error frame callback (once)
|
||||
if (!uiErrorCallbackSet_) {
|
||||
gameHandler.setUIErrorCallback([this](const std::string& msg) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue