Commit Graph
16 Commits
Author SHA1 Message Date
OEVGandClaude Opus 5.5 03cd03c3e6 Restack moves items into matching specialty bags
FindSpecialtyBagMoves() pairs items in general-purpose bags with free
slots in the same inventory's specialty bags (C_Item.GetItemFamily on
item and bag; bags themselves excluded). Restack() queues those moves
first and then consolidates stacks. UpdateCache() refreshes
specialtyMovesAvailable when items changed, which enables the Restack
toolbar button. Restack tooltip text updated (enUS).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwt5PZSpEDkXYzRuRhH
2026-11-02 14:41:44 +00:00
OEVGandClaude Opus 5.5 f9ff62e2b0 Use specialty bags as temporary space during bag swaps
AssignSpecialtySlots() sends items that fit a free specialty-bag slot
(C_Item.GetItemFamily() on the item and on the bag) there before general
space is counted; own specialty bags first, supplemental storage only
when general space runs short. Bags themselves are never assigned. Used
by EmptyBag() and GetAdditionalSlotsNeededToSwapBag(), so the bag
tooltip's "slots needed" agrees. FillBag() only refills a new specialty
bag with items that fit it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwt5PZSpEDkXYzRuRhH
2026-11-02 05:25:17 +00:00
OEVGandClaude Opus 5.5 168b9b6358 Instant moves: don't skip items with charges
GetContainerItemInfo() reports charged items (Wizard Oil, wands...) with
a negative count, so ProcessMoveQueueBatched() treated the slot as empty
and dropped the move. Use the item link to decide whether the source has
an item, and move charged items as a stack of 1. This left one item in a
bank bag being swapped, so the new bag couldn't be placed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwt5PZSpEDkXYzRuRhH
2026-11-02 04:39:35 +00:00
OEVGandClaude Opus 5.5 1c2e1b1912 Fix bank bag swapping
- Put the new bag into bank bag slots with PutItemInBag(); EquipCursorItem()
  doesn't place bags there. Character bag slots keep EquipCursorItem() with
  PutItemInBag() as a fallback if the bag stays on the cursor.
- SwapBag() phase 2 waits up to ~3 s (12 x 0.25 s) for the old bag to be
  reported empty before placing the new one, since instant moves out of the
  bank can take a moment to be confirmed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwt5PZSpEDkXYzRuRhH
2026-11-02 04:27:28 +00:00
OEVGandClaude Opus 5.5 0742732e41 Instant restack and bag swapping with C_Container.MoveItem
MoveItems() uses ClassicAPI's C_Container.MoveItem() when available (and
no move equips a bag): each round sends every move whose slots are free
and unlocked, then waits for BAG_UPDATE_DELAYED (1 s fallback) before the
next round. Restack() queues exact amounts; EmptyBag()/FillBag() move
whole stacks. Locked slots are retried up to 5 times, stock-state
handling matches ProcessMoveQueue(), and the cursor-based queue remains
the fallback. Approach taken from brues-code/pfUI libs/libbagsort.lua.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwt5PZSpEDkXYzRuRhH
2026-11-02 03:49:40 +00:00
OEVGandClaude Opus 5.5 b85eb2ce53 Cheaper window open, lock-only button refresh, re-sort only changed groups
- UiFrame_OnShow requests a full categorization pass only if the last one
  was more than 60 seconds ago.
- Lock-only cache updates refresh just the affected item buttons
  (AssignItemToItemButton) instead of running UpdateWindow().
- SortGroups() reuses a group's previous sorted order when none of its
  items were re-categorized and it holds exactly the same items; any
  full categorization pass invalidates all sorted orders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwt5PZSpEDkXYzRuRhH
2026-11-02 00:00:41 +00:00
OEVGandClaude Opus 5.5 5f0c1c95d6 Re-categorize only changed items; per-frame work only on hovered button
- CategorizeItems() keeps each item's category unless something it was
  based on changed (item, bag/slot, bag type, count, charges, stock
  state, tooltip). A full pass runs on window open, forced resort,
  rebuilt lookup tables, character switch and any non-bag event.
- ActiveQuestItems: raise BAGSHUI_ACTIVE_QUEST_ITEM_UPDATE only when the
  quest item list or counts changed, not after every QUEST_LOG_UPDATE.
- Item buttons: OnUpdate is set on mouse enter and removes itself after
  the mouse leaves; the base template OnUpdate is cleared. Stock badges
  are refreshed once a minute from the window's OnUpdate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwt5PZSpEDkXYzRuRhH
2026-11-01 20:57:18 +00:00
OEVGandClaude Opus 5.5 8f6277d521 Skip unchanged slots and lock-only changes in cache updates
- Normalize the locked flag from GetContainerItemInfo (1/nil) to the
  cached 1/0, so `preLocked ~= nowLocked` no longer treats every unlocked
  slot as changed. Every cache update was re-running ItemInfo:Get() and
  the tooltip scan for every slot.
- When only the locked state changes, record it directly and don't flag
  the cache for re-categorization; the window still redraws.
- Update() re-categorizes only when items changed (cacheNeedsCategorize),
  not for cosmetic lock changes.
- Build emptyGenericContainerSlots for every empty slot on each update,
  since unchanged slots no longer pass through the change branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwt5PZSpEDkXYzRuRhH
2026-11-01 20:46:22 +00:00
OEVGandClaude Opus 5.5 8602f7eeee Cheaper rule calls and one update per item click
- Rules: collect rule function arguments with inline nil checks instead
  of 50 BsUtil.TableInsertNonNil() calls per rule call. Profiling showed
  this was the biggest single cost of re-categorizing on every bag change.
- Item click: queue the window update instead of running it immediately,
  so it merges with the update from the bag/lock events that follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwt5PZSpEDkXYzRuRhH
2026-11-01 20:37:18 +00:00
OEVGandClaude Opus 5.5 afd46c722d Bagshui 1.6.6
- Release the outline drag fix for the Bags/Bank window freezes
- Remove the temporary /bs cpu profiling command

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwt5PZSpEDkXYzRuRhH
2026-11-01 03:07:38 +00:00
OEVGandClaude Opus 5.5 aee35a3c8f Drag inventory windows with an outline to stop drag freezes
Moving the real window made the client re-lay out every item button,
texture and cooldown model on each mouse movement, freezing the game for
seconds with the Bags and Bank open (profiling showed almost no Lua time
during the freezes). A single empty outline frame now follows the mouse,
and the window is moved once on drop. Clicking the outline finishes a
move whose drop was missed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwt5PZSpEDkXYzRuRhH
2026-11-01 03:04:31 +00:00
OEVGandClaude Opus 5.5 0c1b566cf6 /bs cpu: add clamp on/off test switch, drop frame CPU line
ClassicAPI's frame CPU numbers exceeded wall-clock time, so they are no
longer shown. `/bs cpu clamp on|off` toggles SetClampedToScreen on the
inventory windows for the session to test the engine-side drag stalls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwt5PZSpEDkXYzRuRhH
2026-11-01 02:53:35 +00:00
OEVGandClaude Opus 5.5 0dc37a2038 Add /bs cpu profiling report
Reads ClassicAPI's script profiler (scriptProfile CVar) and prints CPU
time per addon, per Bagshui window and per Bagshui function since the
last reset, to find what causes the window-drag freezes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwt5PZSpEDkXYzRuRhH
2026-11-01 02:44:04 +00:00
OEVGandClaude Opus 5.5 509309d9f0 Redraw bag changes on BAG_UPDATE_DELAYED (ClassicAPI)
BAG_UPDATE now marks the inventory as changed and BAG_UPDATE_DELAYED
queues the redraw for the next frame, instead of every BAG_UPDATE
restarting a 0.07s debounce. While a bag is being swapped between slots
the old debounce is kept so the redraw waits for the swap to settle.
A 0.5s safety-net update covers a missing BAG_UPDATE_DELAYED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwt5PZSpEDkXYzRuRhH
2026-11-01 02:34:45 +00:00
OEVG 36fc7acdeb Bagshui 1.6.5
- Changelog: release the Right/Top anchor UI-scale fix as 1.6.5
- Defer inventory redraws while a window is being dragged
- Cache class-callback event ids in QueueClassCallback (less garbage per BAG_UPDATE)
2026-11-01 02:26:58 +00:00
OEVG 896f46f0d1 Bagshui 1.6.4
enUS Localization Update Announcement / localization-update-announcement (push) Canceled after 0s
2026-10-30 15:55:43 +00:00