Fix online selling: CMSG_SELL_ITEM count as uint32, read coinage from field 1219, handle sell/inventory errors

This commit is contained in:
Kelsi 2026-02-06 19:50:22 -08:00
parent 0a26eef154
commit 01a326b186
5 changed files with 60 additions and 9 deletions

View file

@ -1084,6 +1084,10 @@ void InventoryScreen::renderItemSlot(game::Inventory& inventory, const game::Ite
// Right-click: vendor sell (if vendor mode) or auto-equip/unequip
if (ImGui::IsItemClicked(ImGuiMouseButton_Right) && !holdingItem) {
LOG_DEBUG("Right-click slot: kind=", (int)kind,
" backpackIndex=", backpackIndex,
" vendorMode=", vendorMode_,
" hasHandler=", (gameHandler_ != nullptr));
if (vendorMode_ && gameHandler_ && kind == SlotKind::BACKPACK && backpackIndex >= 0) {
// Sell to vendor
gameHandler_->sellItemBySlot(backpackIndex);