Skip to content

Commit

Permalink
fix: wheel ui
Browse files Browse the repository at this point in the history
  • Loading branch information
phacUFPE committed Nov 27, 2024
1 parent 6a6a688 commit 147c823
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/creatures/players/wheel/player_wheel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1200,9 +1200,6 @@ void PlayerWheel::destroyGem(uint16_t index) const {
return;
}

const auto &backpack = m_player.getInventoryItem(CONST_SLOT_BACKPACK);
const auto &mainBackpack = backpack ? backpack->getContainer() : nullptr;

uint8_t lesserFragments = 0;
uint8_t greaterFragments = 0;

Expand Down Expand Up @@ -1663,8 +1660,8 @@ void PlayerWheel::saveSlotPointsOnPressSaveButton(NetworkMessage &msg) {
// Gem Vessels
for (const auto &affinity : magic_enum::enum_values<WheelGemAffinity_t>()) {
const bool hasGem = msg.getByte();
removeActiveGem(affinity);
if (!hasGem) {
removeActiveGem(affinity);
continue;
}
const auto gemIndex = msg.get<uint16_t>();
Expand All @@ -1674,6 +1671,8 @@ void PlayerWheel::saveSlotPointsOnPressSaveButton(NetworkMessage &msg) {
// Player's bonus data is loaded, initialized, registered, and the function logs
loadPlayerBonusData();

sendOpenWheelWindow(m_player.getID());

g_logger().debug("Player: {} is saved the all slots info in: {} milliseconds", m_player.getName(), bm_saveSlot.duration());
}

Expand Down
2 changes: 1 addition & 1 deletion src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9876,8 +9876,8 @@ void Game::playerSaveWheel(uint32_t playerId, NetworkMessage &msg) {
return;
}

player->wheel()->saveSlotPointsOnPressSaveButton(msg);
player->updateUIExhausted();
player->wheel()->saveSlotPointsOnPressSaveButton(msg);
}

void Game::playerWheelGemAction(uint32_t playerId, NetworkMessage &msg) {
Expand Down

0 comments on commit 147c823

Please sign in to comment.