Commit Graph

73 Commits

Author SHA1 Message Date
Brues 452eef3864 Drop custom debuff durations from turtle-wow.lua
C_UnitAuras supplies Turtle-adjusted durations directly to the aura readers,
so the L["debuffs"] database fallback for these four custom debuffs is dead.
2026-07-28 13:29:11 -05:00
Brues 9c529512d1 Replace libtotem with ClassicAPI's native totem tracker
ClassicAPI now ships GetTotemInfo/GetTotemTimeLeft/GetTotemDuration/
TargetTotem plus a native PLAYER_TOTEM_UPDATE event, backed by a
data-driven tracker (slot from the Spell.dbc summon effect, duration from
SpellDuration.dbc, and object-manager death detection). That's exactly
what libtotem hand-rolled -- and better -- so delete the library outright:
its spellid/icon tables, the CastSpellByName/CastSpell/UseAction hooks,
the SPELL_GO commit path, and the active-totem bookkeeping.

modules/totems.lua becomes a thin consumer of the native API:
- Driven by PLAYER_TOTEM_UPDATE; drop the shaman tick-poller that only
  existed because vanilla had no totem event.
- Fix the GetTotemInfo call sites: the native 1st return is tool presence,
  not "summoned", so key active state on name/start instead.
- Right-click a totem icon to TargetTotem it; tooltip shows remaining time
  via GetTotemTimeLeft.

modules/turtle-wow.lua: drop the Totemic Recall handler that poked
libtotem:Clean() -- the native tracker detects the totems despawning and
clears the slots itself. Also clean up the now-orphaned translation string
and a stale libtotem mention in libdebuff's comment.
2026-07-20 21:51:08 -05:00
Brues 2e20a03cbd Restore Inspect UI frame skin
removed during the tbc purge
2026-07-11 12:36:03 -05:00
Brues 13a08b0ea3 Restore hooksecurefunc 2026-07-09 23:01:52 -05:00
Brues 967487e283 Utilizing ClassicAPI 1.6.0
commit d63057474083aa67fda2aa28ee6301334ffc4fdf
Author: Brues <5278969+brues-code@users.noreply.github.com>
Date:   Mon Jul 6 00:59:17 2026 -0500

    Use C_Map.GetMapOverlays instead of hardcoded pfMapOverlayData

    ClassicAPI's C_Map.GetMapOverlays reads WorldMapOverlay.dbc directly and
    returns the full overlay list for a zone (explored + unexplored) — the
    data vanilla's GetMapOverlayInfo withholds. mapreveal now iterates it
    straight (named fields: textureName/texturePath/width/height/offsets),
    dropping unpack_hash and the pfMapOverlayData tables entirely.

    Also fixes the explored-check: it compared the full texture path against
    GetMapOverlayInfo's bare-name keys, so the magnifying glass never
    suppressed on explored overlays. Now matches on the bare name.

    Removes ~870 lines of hand-measured overlay data (base + Turtle).

commit ad12c8209a80cd1211fe08e83f7013d24b5efd2d
Author: Brues <5278969+brues-code@users.noreply.github.com>
Date:   Sun Jul 5 23:45:09 2026 -0500

    utilize HookScript from ClassicAPI
2026-07-09 00:56:06 -05:00
Brues 31c95606d0 Refactor turtle/Nampower checks and libdebuff cleanup
Replace ad-hoc Turtle/Nampower detection with global TURTLE_WOW_VERSION and EventUtil startup flow. Remove legacy IsTurtleWoW and manual PLAYER_ENTERING_WORLD frame; use EventUtil.ContinueOnPlayerLogin. Clean up libdebuff by removing combo-point capture, GetEnhancedDebuffs API, and noisy startup messages; rely on Nampower/AURA_CAST and database fallback for durations. Fix tooltip compare shift handling (cache shift state and pass through). Update xpbar to use TURTLE_WOW_VERSION. Purpose: simplify startup, avoid duplicated logic, and rely on modern APIs for accurate durations.
2026-07-05 23:47:39 -05:00
Brues 3fe072c594 Route hooksecurefunc callers through pfUI.hooksecurefunc; global belongs to ClassicAPI
pfUI's Lua hooksecurefunc lived in pfUI.env and shadowed ClassicAPI's C
global for all pfUI code. Replace it with a thin pfUI.hooksecurefunc shim
that keeps the missing-target no-op our call sites rely on (ClassicAPI
errors on a nil target) and delegates the actual hook to _G.hooksecurefunc.

Migrated all 70 internal call sites (modules/libs/skins) to
pfUI.hooksecurefunc; bare hooksecurefunc now resolves to ClassicAPI's C
version everywhere. Dropped the unused prepend path and the orphaned
pfUI.hooks table.
2026-07-05 14:58:26 -05:00
Brues fc75e091a4 finish IsInRaid sweep across remaining "raid count > 0" sites
Three more `if GetNumRaidMembers() > 0 then` raid-vs-party branches
switched to `if IsInRaid()`. Same intent, named helper. Repo is now
clean of the legacy idiom (verified with a final grep).

Loops that actually need the count (`for i = 1, GetNumRaidMembers() do
GetRaidRosterInfo(i)`) keep the call — only the boolean form changes.
2026-06-27 18:56:50 -05:00
Brues b79132b9f4 casts: route everything through C_Spell, drop libcast + libdebuff_casts
ClassicAPI's recent C_Spell additions cover remote-unit casts natively
(SMSG_SPELL_START co-hook caching per caster GUID), so the two parallel
cast trackers pfUI was running — libcast.lua and the libdebuff_casts
table inside libdebuff.lua — can both retire.

Migrations:
- modules/castbar.lua: focus/player cast-info gathering reads
  C_Spell.UnitCastingInfo / UnitChannelInfo directly. Fallback ladder
  (libdebuff_casts → pfGetCastInfo → pfGetChannelInfo) collapses into a
  single call. Pushback handlers stop writing back into a non-existent
  cache; the local this.endTime is the source of truth.
- modules/nameplates.lua: GetCastInfo(guid) now resolves to a unit token
  via UnitTokenFromGUID and queries C_Spell, returning the same compact
  struct shape downstream code expected. UpdateCastbar collapses from a
  three-branch hierarchy (dead IterDebuffs / libdebuff_casts / libcast)
  to one C_Spell read.
- modules/afkcam.lua: pfGetCastInfo+pfGetChannelInfo round-trip becomes
  a single C_Spell.UnitCastingInfo("player") or UnitChannelInfo fallback.
- libs/libpredict.lua: HealComm timing uses C_Spell on the sender's unit
  token after a small group-roster walk to resolve the sender's name.

Deletions:
- libs/libcast.lua entirely (-571 lines) plus its init/libs.xml entry.
- libdebuff_casts / libdebuff_item_icons tables and their write sites
  in libs/libdebuff.lua (the SPELL_START_*, SPELL_GO_*, SPELL_FAILED_*
  event handlers stop maintaining them but keep firing the
  libdebuff_*_hooks broadcast surface for actionbar / swingtimer /
  libtotem). SPELLCAST_CHANNEL_STOP now reads the active channel from
  C_Spell.ChannelInfo.
- modules/superwow.lua's supercast block — UNIT_CASTEVENT writes into
  libcast.db are redundant now that C_Spell co-hooks the same packet.
- The cast-bar item-icon override that swapped in a potion/trinket
  icon for item-triggered casts. Spell icon stays; the item-icon
  metadata path (libdebuff_item_icons) went with libdebuff_casts.

Steady Shot synthetic cast bar — Turtle WoW-specific:
- castbar.lua gains a pfUI.synthetic_casts[unit] fallback that fires
  only when C_Spell returns nil, so abilities the engine treats as
  instant but which have a meaningful wait window can still render a
  cast bar.
- modules/turtle-wow.lua replaces the old libcast.customcast block with
  a Nampower SPELL_QUEUE_EVENT subscriber. ON_SWING_QUEUED matching
  the localized "Steady Shot" name writes a 1.4s synthetic entry;
  ON_SWING_QUEUE_POPPED clears it; castbar's endMs guard self-expires
  the entry as a safety net. Note: haste scaling (libcast.ApplyShotHaste)
  is gone — bar may finish slightly early under +ranged haste buffs.

Net: 152 insertions, 972 deletions.
2026-06-25 01:18:22 -05:00
Brues 710be52f35 phase 3 removing tbc
Drop the now-vestigial expansion plumbing.

- Delete modules/thirdparty-tbc.lua + its xml Include
- Strip 10 tbc-tagged CreateConfig calls in modules/gui.lua
- Drop the expansion arg from CreateConfig() signature + the disabled-
  entry rendering path that depended on it
- Drop the showdisabled GUI toggle + its default
- Simplify pfUI:RegisterModule / pfUI:RegisterSkin to (name, func) only
- Strip the leading version arg ("vanilla:tbc", etc.) from all 114
  Register call sites
- Delete the pfUI.expansion variable
2026-05-25 18:50:53 -05:00
Brues 802d47312f pfSellData: drop sell column, use C_Item.GetItemSellPriceByID
Each pfSellData entry was a "sell,buy" string. The sell price duplicates
what C_Item.GetItemSellPriceByID returns from the engine's item DBC, so
it's redundant in our table — only the buy price (curated from real
vendor encounters, not a static item property) needs to live here.

Transformed every [id]="X,Y" entry across env/tables.lua, compat/tbc.lua,
and modules/turtle-wow.lua to [id]=Y via sed. Format is now itemid →
buyPrice (number, copper).

sellvalue.lua: reads sell from C_Item.GetItemSellPriceByID(id), reads
buy from pfSellData[id]. Items that have only a sell price (not in
pfSellData) now display sell-only — previously they got no tooltip
addition because the lookup gated on table membership. Items with
buy-only (sell == 0 in old data) still display buy correctly.

autovendor.lua: replaces the pfSellData[id] gate (which only checked
table membership and unused the parsed sell/buy) with a direct
C_Item.GetItemSellPriceByID > 0 check — the engine's canonical
"is this item sellable to a vendor" answer.
2026-05-21 17:19:29 -05:00
Brues 0e0a3f3688 shapeshift cancel via CancelShapeshiftForm
Replaces autoshift's Phase 2 (form-ID → texture lookup → buff iteration →
CancelPlayerBuff(bid)) with a single CancelShapeshiftForm() call. The
implementation in ClassicAPI walks the buff slots and matches via
Spell.dbc effect arrays itself, so we don't have to maintain a form-ID
→ texture map on the Lua side.

Drops pfUI.autoshift.shapeshifts entirely (no longer consulted) and the
turtle-wow.lua block that conditionally appended Tree of Life / Stag
Form textures — Turtle's added DBC rows (form IDs 9 and 11) are handled
natively by the same scan.
2026-05-21 10:31:25 -05:00
Brues 9b2001114d dedup shot-haste loops behind libcast.ApplyShotHaste
The three customcast handlers (Aimed Shot, Multi-Shot, Steady Shot) each
iterated 1..32 UnitBuff slots checking the same four icon paths for
haste-providing buffs. Lifted into libcast.ApplyShotHaste which iterates
the populated auras once via C_UnitAuras.GetUnitAuras and reads from a
single SHOT_HASTE lookup table. Three loop copies collapse to one helper.

Kept texture-keyed matching (rather than spellID) because the Naxx
trinket and Quick Shots procs have spell-ID variants across server
flavors but stable icons.
2026-05-21 03:20:20 -05:00
Meow 93c4166052 possible fix for raid frames not showing up when pfui raid frames are hidden 2026-04-11 21:35:22 +02:00
Meow c8625668d4 Added missing zone/map infos
Thanks @paokkerkir for pointing it out.
2026-03-27 17:06:52 +01:00
Meow 6b2cda55ae talent inspection fix 2026-03-23 15:43:25 +01:00
Meow 7c73ccb02e Update turtle-wow.lua 2026-03-22 13:11:54 +01:00
Meow 4c1c4a5176 Reapply "Fix invisible frames intercepting mouse clicks"
This reverts commit e663a40460.
2026-03-22 12:36:47 +01:00
Meow e663a40460 Revert "Fix invisible frames intercepting mouse clicks"
This reverts commit 7d0898c563.
2026-03-22 12:32:05 +01:00
Meow 7d0898c563 Fix invisible frames intercepting mouse clicks
Disable mouse on Turtle GroupUI frames and all children when pfUI replaces them
Re-enable mouse when Turtle frames become active again
Prevent combat screen overlay from blocking clicks
Use explicit EnableMouse(false) instead of nil for StatusBar widgets
2026-03-22 12:24:12 +01:00
Meow 283bacf2a4 Hide/show turtle-wow raid/group frames when pfui hidden and reversed 2026-03-22 00:42:37 +01:00
Meow 707e05cdca fixed menu for UnitPopup in chat 2026-03-21 20:12:07 +01:00
Meow 28f7240e7c fixed raidframes and inspect 2026-03-20 19:05:51 +01:00
Meow 6c4af1c92c several fixes for inspect with new patch
Note:  Seeing talents of other players is a thing from t-wow side, this doesn't work until fixed by turtle-wow
2026-03-20 18:08:16 +01:00
Mats391 d9249b366f Merge remote-tracking branch 'TWoWPfui/master' 2026-02-22 13:21:02 +01:00
Meow 02e5ecdbeb 6.2.2 push
For more informations read the readme please!
2026-01-10 12:48:07 +01:00
Meow 77147242f4 v6.2.0 - HoT Timer System Overhaul & Nameplate Fixes
HoT Timer fixes (Regrowth duration, Instant-HoT detection, SuperWoW UNIT_CASTEVENT support, HealComm compatibility), Nameplate zoom/flicker fixes, Druid Rip/Rake combo point tracking, Ferocious Bite refresh fix, energytick talent filter.

See README.md for full changelog.
2026-01-10 03:42:42 +01:00
Mats391 e6340d9ac9 Lighter blue to be more readable 2025-09-13 00:14:39 +02:00
Mats391 4d4c2be7be Added indicator for day/night 2025-09-12 22:05:02 +02:00
shagu b2f6df84a9 turtle-wow: refresh rip duration on ferocious bite 2025-08-28 12:10:33 +02:00
shagu f0084fb957 turtle-wow: update sell value database to 1.18 2025-08-15 09:46:55 +02:00
shagu eb4f7f84a0 turtle-wow: update map data to 1.18 2025-08-15 09:20:37 +02:00
shagu 73561eda4a compat: make hooksecurefunc append by default 2025-07-30 20:18:52 +02:00
shagu 37a5f1a840 turtle-wow: remove chat ignore dropdown feature 2025-07-30 20:11:38 +02:00
shagu a982e62630 turtle-wow: reduce duration of deep wound to 6 sec 2025-07-17 22:24:46 +02:00
Ben 8ad04f2b49 time: handle 24-hour to 12-hour clock conversion edge cases 2025-06-08 08:57:28 +02:00
shagu 318f8710fd turtle-wow: only load talent inspect skin if available 2025-06-05 22:14:59 +02:00
shagu 98e241703d turtle-wow: add talent inspect skin 2025-05-07 20:18:02 +02:00
shagu 048609a68b turtle-wow: update sellvalue db to 1.17.2 2025-04-29 18:17:05 +02:00
shagu 39db30cce3 turtle-wow: remove earthshaker slam from tracking 2025-04-25 16:04:43 +02:00
shagu aba154acbd turtle-wow: fallback to empty custom cast string 2025-04-09 21:34:38 +02:00
shagu 73ced8bb0c turtle-wow: add custom steady shot castbar 2025-04-09 13:12:22 +02:00
shagu 341d7ccb40 turtle-wow: only adjust game menu size if needed 2025-04-07 09:23:26 +02:00
shagu 084527286d turtle-wow: add fast travel form to autoshift 2025-04-01 20:01:29 +02:00
shagu 1e4458c9ad turtle-wow: add skin for shop menu button 2025-03-22 20:36:43 +01:00
shagu 5a23120e43 turtle-wow: only patch libtotem if existing 2025-02-01 22:44:59 +01:00
shagu 906e798516 turtle-wow: move library overwrites to base module 2025-01-06 10:42:49 +01:00
shagu 0bb9d210a3 turtle-wow: only watch for totemic recall on shamans 2025-01-06 10:32:38 +01:00
jmgibson1981 fc60b42b01 turtle-wow: add totemic recall spell logic to libtotem 2025-01-06 10:31:28 +01:00
shagu 77b8fb7513 turtle-wow: add support for custom continent clock 2024-12-22 10:43:50 +01:00