Update audit for ClassicAPI map and reagents

This commit is contained in:
Dusk-92
2026-08-30 14:24:53 +02:00
parent 5f4a2005ad
commit ed41609fe1
+28 -28
View File
@@ -41,13 +41,10 @@ container item link/count data.
- **Show Dispel Indicators** — normalized `GetDebuffType` via the bridge. - **Show Dispel Indicators** — normalized `GetDebuffType` via the bridge.
- **Show Bags** — Shift/Control state via the bridge. - **Show Bags** — Shift/Control state via the bridge.
- **Show Micro Menu** — Shift/Control state via the bridge. - **Show Micro Menu** — Shift/Control state via the bridge.
- **Reagent Counter** — action spell/macro resolution, spell reagents and
### Indirect ClassicAPI-first module direct item counts via the bridge.
- **Reveal World Map** — unexplored overlay data and live client map metadata
- **Reagent Counter** uses the shared `ShaguTweaks.GetItemCount` helper. That via the bridge.
helper now obtains stack counts, item IDs and item names through
`ShaguTweaks.API`, so the module receives ClassicAPI container/item data
without duplicating API logic locally.
### Modules intentionally remaining on native APIs ### Modules intentionally remaining on native APIs
@@ -68,7 +65,6 @@ not expose a replacement required by this addon:
- Show Healing Predictions - Show Healing Predictions
- Hide Party Frames - Hide Party Frames
- Use As Party Frames - Use As Party Frames
- Reveal World Map
Examples include `CreateFrame`, anchoring/layout methods, chat-frame Examples include `CreateFrame`, anchoring/layout methods, chat-frame
`AddMessage`, `UseContainerItem`, `GetContainerNumSlots`, `AddMessage`, `UseContainerItem`, `GetContainerNumSlots`,
@@ -91,6 +87,11 @@ The paired ShaguTweaks-ClassicAPI branch adds:
- `API.UnitInRange` - `API.UnitInRange`
- `API.GetContainerItemLink` - `API.GetContainerItemLink`
- `API.GetContainerItemStackCount` - `API.GetContainerItemStackCount`
- `API.GetSpellReagents`
- `API.GetItemCount`
- `API.GetMapOverlays`
- `API.GetUnexploredMapTextures`
- `API.GetAreaInfo`
`API.UnitInRange` prefers ClassicAPI's reach-aware 40-yard implementation. `API.UnitInRange` prefers ClassicAPI's reach-aware 40-yard implementation.
It explicitly handles the player's own frame and keeps the old interaction It explicitly handles the player's own frame and keeps the old interaction
@@ -384,17 +385,16 @@ Previously replaced `ReputationWatchBar_Update` globally. It now uses the
shared ShaguTweaks safe hook helper and preserves Blizzard/Turtle behavior. shared ShaguTweaks safe hook helper and preserves Blizzard/Turtle behavior.
Added a guard for the XP-bar background region. Added a guard for the XP-bar background region.
#### Reagent Counter — optimized #### Reagent Counter — ClassicAPI-backed / optimized
The tooltip scan is unavoidable because ClassicAPI does not expose the reagent ClassicAPI now resolves action slots and macros to spell IDs, exposes spell
requirements needed for this action-button feature. Item counting itself is now reagent item IDs directly, and provides direct inventory counts. The module no
ClassicAPI-first indirectly through the shared `ShaguTweaks.GetItemCount` longer scans action tooltips or parses localized reagent text.
helper. Previously an `OnUpdate` ran permanently and all 120 action slots were
rescanned after every bag event.
Now the frame sleeps while idle. Action-layout events request a one-frame The frame still sleeps while idle. Action-layout or macro events rebuild the
tooltip rescan; `BAG_UPDATE` only refreshes counts for reagents already known. slot-to-reagent mapping once; `BAG_UPDATE` only refreshes counts for reagent
Button and count-font accesses are also nil-guarded. IDs already referenced by active actions. The action button keeps the original
single-counter behavior by displaying the first reagent's owned count.
#### Center Vertical Actionbar — retained #### Center Vertical Actionbar — retained
@@ -439,20 +439,20 @@ Item IDs/names now use `ShaguTweaks.API.GetContainerItemID` and
the Vanilla fallback centralized. This improves compatibility with ClassicAPI the Vanilla fallback centralized. This improves compatibility with ClassicAPI
item caches and custom Turtle items. item caches and custom Turtle items.
#### Reveal World Map — critical fix / hardened #### Reveal World Map — ClassicAPI-backed / simplified
Fixed a broken `create_hash` call that omitted the `prefix` argument and The old hand-maintained Vanilla and Turtle overlay tables were removed.
shifted all remaining parameters. This could feed a number into string ClassicAPI now reads `WorldMapOverlay.dbc` from the active client and returns
operations during map overlay processing. the exact unexplored overlays and resolved tile layout, including custom
Turtle-like zones.
The module no longer manually replaces `WorldMapFrame_Update`. A pre-hook The module keeps Blizzard's normal explored-map rendering untouched and adds
clears overlay textures and a post-hook adds the reveal layer while preserving only the unexplored reveal layer in a safe post-hook of
the native/Turtle updater. `WorldMapFrame_Update`. Exploration markers use ClassicAPI hit rectangles and
localized area names when available.
Internal overlay state is now anchored explicitly on `WorldMapFrame` instead This removes the large static map database and the manual tile-grid logic while
of relying on the implicit global `this` value. making the reveal data follow the installed client's actual maps.
Turtle WoW 1.18.1 custom map overlay data from upstream is preserved.
### Chat ### Chat