Commit Graph

2301 Commits

Author SHA1 Message Date
Brues 554c447514 swingtimer HS/Cleave detection via spell name compare
GetActionInfo + GetMacroSpell resolve each action slot to a spell name
(or skip if it's an item / empty / non-resolvable macro). The names to
match against come from C_Spell.GetSpellName on the canonical rank-1
spellIDs (78 = Heroic Strike, 845 = Cleave) so the comparison is
locale-independent without hardcoding all ranks: every rank of Heroic
Strike returns the same localized name.

Replaces the old two-path scan (texture string match + hardcoded
English name match against "heroic strike" / "hs" / "cleave"). Closes
two correctness holes the old logic had: macros that cast HS/Cleave
with a custom icon now match correctly, and macros merely *named* "HS"
without actually casting HS no longer false-match.
2026-05-21 16:53:26 -05:00
Brues 8e635afeed GetItemCount via C_Item, reagents via C_Spell.GetSpellReagents
Drops the legacy pfUI.api.GetItemCount wrapper (name-based bag walk +
GetItemInfo per slot) entirely — both call sites switch to direct
C_Item.GetItemCount(itemID) calls.

actionbar reagent counter: drops the SPELL_REAGENTS tooltip-scan +
libtipscan dependency. UpdateSlot now does GetActionInfo(slot) →
spellID → C_Spell.GetSpellReagents → reagent itemID, stored per slot.
Counts update via C_Item.GetItemCount(itemID). reagent_counts is
keyed by itemID instead of localized name string. Multi-reagent
spells now resolve cleanly (only first reagent counted, matching old
single-name behavior). Macro and bag-item actions skip cleanly.

questitem: switches to hooksecurefunc("SetItemRef", ...) + the
modern GameTooltip:HasItem / :GetItem pair instead of monkey-patching
_G.SetItemRef and string.find-parsing the "item:NNN" out of the link.
Drops the libtooltip indirection for the regular tooltip path —
GameTooltip:GetItem returns name + itemID directly. AddTooltip
extended to accept the itemID (both callers already had it and were
discarding it).
2026-05-21 16:20:19 -05:00
Brues e1cd1ef179 mount cancel via Dismount
Replaces the Phase 1 buff-slot loop + tooltip-scanned mount-string match
with a single Dismount() call. The implementation in ClassicAPI scans
for SPELL_AURA_MOUNTED on the player's auras and sends the cancel
packet itself, so we don't have to maintain a localized list of mount
tooltip patterns ("Increases speed by X%", "Erhöht Tempo um X%", etc.).

Drops pfUI.autoshift.mounts (the 20-line localized-string table) and
pfUI.autoshift.scanner (its only consumer). Module is down to ~50 lines
from ~150 at session start.
2026-05-21 10:40:42 -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 0fead7d696 shapeshift detection via GetShapeshiftFormID + UPDATE_SHAPESHIFT_FORM
actionbar.lua: pageswitch now listens to UPDATE_SHAPESHIFT_FORM as the
authoritative form-change signal. PLAYER_AURAS_CHANGED becomes a
narrowly-scoped prowl-detection trigger that runs after form state is
already known. The Nampower SPELL_GO_SELF hook drops its Cat Form
(spellID 768) branch — UPDATE_SHAPESHIFT_FORM covers form changes
without per-spellID watchlists. Prowl IDs stay hooked for zero-latency
detection that PLAYER_AURAS_CHANGED can't match.

autoshift.lua: the texture-list shapeshift detection becomes a form-ID-
keyed map. GetShapeshiftFormID returns the active form directly so we
don't have to texture-match against every possible form pattern. The
moonkin_scan frame disappears entirely — its talent-conditional was a
workaround for the agility buff sharing Moonkin's icon, which form ID
makes irrelevant (form 31 is only reported when the player is genuinely
in Moonkin Form). Loop also splits into two phases for clarity: mount
priority pass, then form cancel.
2026-05-21 04:25:50 -05:00
Brues 6be11baf29 HasCatForm via GetShapeshiftFormID
Drops the C_UnitAuras helpful-aura iteration in favor of a direct engine
state read. GetShapeshiftFormID returns vanilla 1.12.1's stable per-form
DBC ID (Cat = 1), so the helper collapses to a one-liner that's
locale-independent, talent-independent, and works without scanning any
buff list.
2026-05-21 04:04:31 -05:00
Brues 8818d68aea druid prowl detection via IsStealthed
FullScan/HasProwlBuff stop iterating GetPlayerBuffTexture(0..31) for the
prowl buff — that's exactly what ClassicAPI's IsStealthed() returns,
locale-independent and zero allocations. Cat-form detection still needs
the icon (GetShapeshiftForm's index varies by talents/learned forms) but
moves to one C_UnitAuras.GetUnitAuras iteration over populated auras via
the new HasCatForm helper.

The inline cat-form recheck after a prowl ends collapses to one
HasCatForm() call. HasProwlBuff is inlined to IsStealthed() at its
single call site.
2026-05-21 03:39:20 -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
Brues 9ba4b3e408 buffwatch via C_UnitAuras
Player branch in GetBuffData now reads from C_UnitAuras.GetAuraDataByIndex
directly, dropping the GetPlayerBuff chain plus the tooltip-scan for the
buff name. Lazy bid resolution for CancelPlayerBuff. All four tooltip
calls (SetPlayerBuff/SetUnitBuff/SetUnitDebuff x2) collapse to the unified
GameTooltip:SetUnitAura. UnitDebuff dispel-color lookup at line 312 reads
aura.dispelName instead. libdebuff path preserved for non-player units
that still need caster correlation.
2026-05-21 03:10:59 -05:00
Brues b18e6ffa67 refresh buff durations on player 2026-05-21 02:35:46 -05:00
Brues 82743b0f9a UnitAUra cleanup 2026-05-18 23:42:51 -05:00
Brues b9343ec601 utilize SetUnitAura 2026-05-18 22:43:50 -05:00
Brues bcb71c8cca swpping to GetActionInfo 2026-05-18 13:20:09 -05:00
Brues 67146ef3a4 begin utilizing ClassicAPI 2026-05-16 13:02:38 -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 f49bf4f1a9 Skip firstrun if importing shared profile 2026-04-11 21:24:36 +02:00
Meow 5ef01174d6 New module - InnervateCall (only for druids)
- This module will call in group/raid and battleground if you innervated yourself or someone else.
- The module will inform your group/raid/battleground if innervate is ready again.
2026-04-11 21:10:57 +02:00
Meow 85dce25804 added slam and hammer of wrath to swingtimer 2026-04-11 20:46:38 +02:00
Meow f0963c4e99 small fix for marktracking display 2026-04-10 17:31:02 +02:00
Meow 9128f02133 Add fill order option for actionbars
- "Row-first" fills buttons left-to-right, top-to-bottom (1,2,3 / 4,5,6)
- "Column-first" fills top-to-bottom, left-to-right (1,3,5 / 2,4,6)
- "Auto" preserves the original behavior based on uneven orientation
2026-04-10 16:33:06 +02:00
Meow 5f9e69933f Revert "Added a fillmode variant to actionbars"
This reverts commit 0838c6ec3a.
2026-04-10 15:26:18 +02:00
Meow 0838c6ec3a Added a fillmode variant to actionbars 2026-04-10 15:24:39 +02:00
Meow 6fb45b3971 nameplate fixes
- fixed raidicon to bug out if nameplates for specific unit types are hidden
- fixed raidicon to NOT be behind the nameplate when nameplates are shown
2026-04-04 00:28:11 +02:00
Meow d1692288f4 raid icon fix 2026-04-03 01:15:25 +02:00
Meow fbb1b9df46 Refactor: Tracking spell detection
Improved tracking spell detection to use SpellID + icon path matching (case-insensitive) for more accurate and locale-independent results
2026-04-02 19:32:00 +02:00
Meow a0e3fbb00d taking over nameplates.lua from experiment branch 2026-04-02 06:07:50 +02:00
Meow 22968b6c23 added back throttle control for players in pfui 2026-04-02 04:55:29 +02:00
Meow 136aca02c5 Performance update for nameplates: optimize update loop, combat detection and debuff rendering
- Decouple OnValueChanged from OnDataChanged to prevent expensive
  full updates on every HP tick

- Replace UnitAffectingCombat(guid) with GetUnitField(flags) bitcheck
  and add 0.2s per-GUID throttle cache for GetCombatStateColor

- Gate HP bar SetMinMaxValues/SetValue and text formatting behind
  hp/hpmax change detection

- Inline castbar update into per-plate OnUpdate loop, remove dedicated
  castbarFrame overhead

- Switch debuff slot cache from name-keyed to slot-index-keyed to fix
  timer reset bug when debuffs shift after expiry

- Add raidGuidCache (rebuilt on RAID_ROSTER_UPDATE/PARTY_MEMBERS_CHANGED)
  for O(1) offtank target-name lookup

- Add UNIT_FLAGS_GUID event support for instant combat flag notification
  (Nampower)

- Extract RebuildOfftanks() to ensure offtanks table is populated at
  startup, not only on config change

- Reuse childs table across scan ticks to reduce GC pressure

- Add zoominstant config option to skip zoom animation

- Add combatColorCache cleanup on plate hide and combat leave

Please report any bugs that appear after this change, since it is a huge change.
2026-04-02 04:15:18 +02:00
Meow aa2cb95ec2 Several changes
Fix stale debuff icons/tooltips on target frame after target swap
Fix debuffs not showing on nameplates for timer-less spells (e.g. Hurricane)
Fix buffwatch timer visually speeding up when another debuff fades
Remove 50ms aura cache (slotMapCache/auraFC) - caused stale debuff data
Remove "Show Only Own Debuffs" from unitframes and nameplates GUI
Force selfdebuff=0 for unitframes/nameplates on login to reset old SavedVariables
2026-03-31 19:51:36 +02:00
Meow 1f72b93ea5 New feature for "Buff" > "Target Debuff Bar"
"Target Debuff Bar" should now correctly show only own debuffs (there will be still debuffs that are not shown up properly like AOE spells or procs)
2026-03-31 07:11:48 +02:00
Meow 88c8968158 Adjusted raidicons to be in FRONT of the health bar, not behind it 2026-03-31 02:52:00 +02:00
Meow 491fcd51c8 New option to pick Original or pfui raid marks! 2026-03-31 02:20:53 +02:00
Meow 91590b5025 Changed the raid icons to use the original Blizzard icons! 2026-03-31 01:43:05 +02:00
Meow e66062c3b6 pull request modification from @Doite for actionbar 2026-03-31 01:12:10 +02:00
Meow 3ecc52e4cc Revert "Fix for bar layout+alternatives+uneven orientation" 2026-03-30 18:53:48 +02:00
Meow 474135ec15 Merge branch 'master' of https://github.com/me0wg4ming/pfUI 2026-03-30 17:25:19 +02:00
Meow b6e1f3cfb2 moved this.lastmax = nil to an other block (pull request) 2026-03-30 17:25:17 +02:00
Meow 8ad254c01e Merge pull request #126 from florian-gustin/master
Maul Swing color timer
2026-03-30 17:04:21 +02:00
Meow 2bbc5f1e52 Merge pull request #131 from Player-Doite/master
Fix for bar layout+alternatives+uneven orientation
2026-03-30 17:03:58 +02:00
Meow 77f50fbf9b possible fix for timers vanishing on nameplates. 2026-03-30 16:20:42 +02:00
Meow d3ee08c170 fix for castbar not resetting if timer duration is the same as before. 2026-03-30 03:19:11 +02:00
Meow 811d606650 castbar: fix pushback display for casts and channels
- use SPELL_DELAYED_SELF (nampower) for cast pushback instead of pfGetCastInfo
- use SPELLCAST_CHANNEL_UPDATE remaining time for channel pushback
- move SetMinMaxValues outside endTime guard so bar visually extends on pushback
2026-03-29 23:42:30 +02:00
Meow f14b881cff fixed castbar to show cast delays properly again. 2026-03-29 23:00:14 +02:00
Meow f5cc0dabf2 fixed a bug with uf_tukui module (missing nil value) 2026-03-29 19:28:04 +02:00
Meow c1c9b4b55e fixed castbar being not smooth for some rare case players on nameplates 2026-03-29 01:30:47 +01:00
florian-gustin 8a2ad1af1b Merge pull request #5 from me0wg4ming/master
mfo
2026-03-29 00:42:28 +01:00
Meow 4fe7795f24 Branch-aware update notifications
Master and experiment users no longer cross-notify each other about updates. The version message now includes a branch tag (master or exp) derived from the toc version string at runtime — only players on the same branch trigger the update notification. No config needed, works automatically.
2026-03-28 15:01:32 +01:00
Meow 462f087ece fixed fake castbar showing up for some hunter spells/abilitys. 2026-03-28 14:31:37 +01:00
Meow 956582ff08 Fixed missing ranks.
- Added a new method to display spellrank when casting spells (nampower GetSpellRecField)
2026-03-28 12:59:44 +01:00
florian-gustin 26d582c74f Merge pull request #4 from me0wg4ming/master
Merging from official
2026-03-27 18:49:40 +01:00