fix(vendor): dropping the oldest buyback item moves the rest up, as live

Live's 28th sale to a full buyback removed the oldest item, then sent
MoveItemInInventory (inventory 11, VENDOR_BUYBACK) for each of the 26 items
left, to slots 0 to 25 in order, before the sold item was added after them.
The server left the hole, so the sold item took the dropped item's slot
and the buyback page was no longer in sale order. The buyback inventory is
not saved and nothing changes hands; only slots move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-10-02 10:50:25 -05:00
parent 1ac1248161
commit 66dca36b63
3 changed files with 78 additions and 0 deletions

View File

@@ -75,6 +75,9 @@ public:
// a slot of their own.
static void MakeRoomInBuyback(InventoryComponent& inventory, const Item& sold, uint32_t count);
// Moves the buyback items up to slots 0, 1, ... in their order, telling the player of each one that moved
static void CompactBuyback(InventoryComponent& inventory);
private:
void HandleMrReeCameras();
bool SetupItem(LOT item);