mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-27 01:00:13 +00:00
feat: add Sort Bags button to backpack window
Adds Inventory::sortBags() which collects all items from the backpack and equip bags, sorts them client-side by quality descending → item ID ascending → stack count descending, then writes them back. A "Sort Bags" SmallButton is rendered in the backpack footer with a tooltip explaining the sort order. The sort is purely local (no server packets) since the WoW protocol has no sort-bags opcode; it provides an instant, session-persistent visual reorder.
This commit is contained in:
parent
3e3bbf915e
commit
d99fe8de0f
3 changed files with 66 additions and 10 deletions
|
|
@ -125,6 +125,10 @@ public:
|
|||
int findFreeBackpackSlot() const;
|
||||
bool addItem(const ItemDef& item);
|
||||
|
||||
// Sort all bag slots (backpack + equip bags) by quality desc → itemId asc → stackCount desc.
|
||||
// Purely client-side: reorders the local inventory struct without server interaction.
|
||||
void sortBags();
|
||||
|
||||
// Test data
|
||||
void populateTestItems();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue