50 Commits

Author SHA1 Message Date
Brues 269c6ba67e Fix the same 0-based slot assumption in the equipment Lua fallbacks
#2 corrected IsItemInSlot's native path, but the same 0-based assumption was
still present in the two Lua fallbacks, which run on nampower < v2.18. Per
nampower's SCRIPTS.md the slot is 1-19 (16=MainHand, 17=OffHand), and
ClassicAPI's GetInventoryItemID is 1-based as well:

- GetEquippedItem's fallback called GetInventoryItemID(slot + 1), contradicting
  both its own native path and its doc comment.
- GetEquippedItems' fallback built 0-18 keys while the native path returns
  1-19, so the two branches handed back differently-keyed tables.

Neither wrapper currently has any callers, so this was latent rather than
user-visible. Also records the 1-indexed convention at the IsItemInSlot call
site, where the misleading "0-indexed" comment used to be.
2026-09-09 02:40:57 -05:00
Sami Lappalainen c7905c2a70 fix for off-by-one error (#2) 2026-09-09 02:38:57 -05:00
Brues 7c71f8fc26 Use ClassicAPI UnitPower* for power reads; drop GetUnitField/SuperWoW paths
Add ClassicAPI UnitPower/UnitPowerMax/UnitPowerMissing/UnitPowerType wrappers
and route the power conditionals through them:
- ValidatePower/ValidateRawPower/GetCachedPlayerPower(Percent) use UnitPower /
  UnitPowerMax (omitted type = primary power, matching the old UnitMana path).
- ValidatePowerLost uses UnitPowerMissing (one call vs max - current).
- powertype/nopowertype use ClassicAPI.UnitPowerType.

Replace the SuperWoW "2nd return of UnitMana = caster mana" druid hack in
ValidateDruidRawMana and the #showtooltip OOM check with UnitPower(unit, 0),
which reads the mana slot directly and survives shapeshift. Verified in Cat
Form: UnitPower('player', 0) returns caster mana while UnitPower('player', 3)
returns energy.

Remove the now-dead Nampower GetUnitField-based GetUnitPower/GetUnitMaxPower
wrappers and POWER_FIELDS tables (no caller passed a powerType, so that path
never ran).
2026-07-27 19:27:25 -05:00
Brues efc98bcd6a Use ClassicAPI GetSpellBonusDamage/Healing for spell-power conditionals
Migrate the healing/*_power/spell_power conditionals off Nampower's
GetSpellPower to ClassicAPI GetSpellBonusDamage(school) / GetSpellBonusHealing.
Both read the same client field, so the per-school damage values are identical
while dropping the Nampower v2.31 gate.

Fixes healing/healingpower: GetSpellPower returns no healing value, so they were
returning the 2nd school (holy spell damage) as a stand-in for +healing.
GetSpellBonusHealing returns the real (derived) +healing.

Prune the now-unused Nampower GetSpellPower wrapper, feature-table entry, and
feature flag.
2026-07-27 18:57:58 -05:00
Brues ae09b23afd Resolve item sets via ClassicAPI; drop Reliquary dependency
Item-set membership and set info now read ItemSet.dbc directly through
ClassicAPI instead of the nampower/Reliquary glue, so set features no
longer require the Reliquary DLL to be installed.

- ClassicAPI.lua: add GetItemSetIDByID and GetItemSetInfo wrappers.
- Utility.lua: repoint ResolveSetItems, CountEquippedSetItemsBySetId,
  GetEquippedItemSetInfo, and GetEquippedSetPieceCount at the ClassicAPI
  accessors. Set-name matching now uses the DBC name (localized; identical
  to the old enUS path on English clients).
- NampowerAPI.lua: remove the now-unused GetItemSet/GetItemSetId/
  GetItemSetItems/GetItemSetBonuses, the dead GetSpellEffectRadius (no
  callers, only radius source was Reliquary), and the orphaned RQ_SafeCall.
- Init.lua: drop hasReliquary detection and its startup feature line.
- Conditionals.lua: update the [set:] comment (no longer Reliquary-gated).
2026-06-21 14:29:28 -05:00
Brues f21f90d0f1 Adopt ClassicAPI accessors: cursor, item IDs, spell mechanic
Lean on ClassicAPI's backported readers instead of link-string parsing
and a hand-maintained mechanic table.

- ClassicAPI.lua: add wrappers GetCursorInfo/CursorHoldsItemID,
  GetContainerItemID, GetInventoryItemID, and GetSpellMechanicByID.
- Core.lua: in the manual equip fallback, verify the cursor holds the
  intended item (CursorHoldsItemID) before EquipCursorItem, aborting only
  on a definitive mismatch so empty/unknown cursors behave as before.
- NampowerAPI.lua / Utility.lua: replace GetContainerItemLink /
  GetInventoryItemLink + "item:(%d+)" parsing with direct C_Container/
  inventory ID lookups at the sites that only need the itemID; route the
  equipped-set scans through the GetEquippedItemID helper.
- Conditionals.lua / Utility.lua: replace the 785-entry CCSpellMechanics
  fallback table with C_Spell.GetSpellMechanicByID in GetSpellMechanic and
  GetSpellCCType (BuffLib / nampower paths unchanged); delete the table.
2026-06-21 14:02:49 -05:00
Jrc13245 719021ff65 Add set conditional, rmarkorder, Reliquary DBC integration, and fix immunity tracking false positives 2026-03-27 16:01:34 -04:00
Jrc13245 d380fe314c feature live passing conditional checker 2026-03-15 12:17:45 -04:00
Jrc13245 4ddac30726 fix inrange distance measuring, add distance range count threshold for enemy count, add filters for count mode, fix stopattack 2026-03-15 11:11:40 -04:00
Jrc13245 efdcde3eca performance updates, meleerange conditional checks if unit is alive 2026-03-11 19:57:33 -04:00
Jrc13245 4ccd0f81aa fix player buff stacks count and all unit stack count off by one 2026-03-06 16:44:36 -05:00
Jrc13245 37dd0bac94 update for nampower 3_3 and add /cursive to macrochecker whitelist 2026-03-05 23:06:42 -05:00
Jrc13245 82b2ab889f remove superwow requirement by using nampower, update nampower support to 3_1_0 2026-03-02 19:55:53 -05:00
Jrc13245 b56beef4b2 remove more superwow only functions 2026-03-02 09:01:34 -05:00
Jrc13245 2f0f000733 no superwow required, update for nampower 3 2026-03-01 09:33:41 -05:00
Jrc13245 9811d9c894 update for nampower 2_41_0 and update readme 2026-02-22 20:00:21 -05:00
Jrc13245 1f406434e3 update for nampower 2_40 2026-02-20 22:15:07 -05:00
Jrc13245 5e067afd26 update pfcast and pfui markertracker compatibility 2026-02-19 22:10:32 -05:00
Jrc13245 15091a867b fix fallback movement conditional and update nampower support to 2_38 2026-02-18 17:18:48 -05:00
Jrc13245 ec43a636d6 update for pfui buff tracking and nampower buff tracking fallback 2026-02-17 19:19:07 -05:00
Jrc13245 d5fefc3198 use nampower for default moving conditional when available. add rooted to mycc/nomycc/cc/nocc. add swimming/noswimming support with nampower 2_36 2026-02-15 14:38:58 -05:00
Jrc13245 dae56dbb16 slashcommand whitelist 2026-02-14 10:38:03 -05:00
Jrc13245 3a3719a37a initial overflowtest 2026-02-12 21:19:20 -05:00
Jrc13245 f2bce42acb fix some blizzard commands missed in the macro checker, updates for nampower 2.33 2026-02-11 17:22:08 -05:00
Jrc13245 ec1075b9f4 onupdate and onevent performance updates 2026-02-09 22:22:10 -05:00
Jrc13245 fbd878d419 fix misnumbering nampower version (im tired) 2026-02-02 23:00:53 -05:00
Jrc13245 8bee899d05 nampower v2_71 compatibility 2026-02-02 22:49:36 -05:00
Jrc13245 174c636673 fix macro icons, enhance libdebuff further with nampower, code cleanup, improve compatibility with supermacro 2026-01-31 15:02:03 -05:00
Jrc13245 7d0dec2a2b cursive mouseover support, applymain and applyoff slashcommands, nampower feature update with incominghit, lastswing, buffcap, debuffcap conditionals 2026-01-12 17:13:40 -05:00
Jrc13245 2a4734f258 update nampower for copy use in cached table references 2026-01-06 15:04:51 -05:00
Jrc13245 f457ac7ec4 check nampower version to get exact functionality for that version as well as update cursive compatibility and custom spell add cursive functions 2026-01-03 16:11:13 -05:00
Jrc13245 2e9251ee0c fix nampower duration modifier calculation 2025-12-30 18:58:22 -05:00
Jrc13245 5b6d8268e0 add pcall to more nampower functions 2025-12-28 11:41:45 -05:00
Jrc13245 370167b3a7 update for nampower errors 2025-12-27 14:38:24 -05:00
Jrc13245 d6144a7e83 fix nampower error 2025-12-26 13:41:14 -05:00
Jrc13245 473e7f8741 crowd control conditionals 2025-12-24 11:01:57 -05:00
Jrc13245 cfd44e30a3 redo range tracking for self cast, ground targeting, channeled/unit targeting spells, and ignore direct spells 2025-12-22 15:37:13 -05:00
Jrc13245 ca50bb5b55 fix icon out of range on self cast spells and nil check for combodurations 2025-12-22 12:05:20 -05:00
Jrc13245 7f7e27ccf1 fix range on self cast spells 2025-12-21 15:15:32 -05:00
Jrc13245 dbaa060522 fix channel spells range 2025-12-20 14:31:45 -05:00
Jrc13245 d8b4a097b3 reduce garbage creation and fix channel spell range checks 2025-12-20 13:46:06 -05:00
Jrc13245 58431b1967 fix use with nampower and boss creature type 2025-12-20 13:23:13 -05:00
Jrc13245 c3721036bd fix spellbook and actionslot errors 2025-12-20 08:20:17 -05:00
Jrc13245 eede643540 optimize buff and debuff checks and update functions to nampower v2_18_0 2025-12-17 16:29:32 -05:00
Jrc13245 1c76c12ff1 remove addon-level nampower spell queuing 2025-12-15 07:31:36 -05:00
Jrc13245 b5f7399d30 fix nampower queuing issues and debuff duration issues 2025-12-11 16:57:31 -05:00
Jrc13245 869d1a404b fix mouseover casting for users not using an updated nampower 2025-12-07 21:53:41 -05:00
Jrc13245 86fa4476f6 fix equip with conditionals and dont pollute runmacro global namespace 2025-12-05 18:26:33 -05:00
Jrc13245 89ba623b11 remove some login spam 2025-12-04 18:15:09 -05:00
Jrc13245 04f4eacac8 nested macro showtooltip support, nampower queue casting integration, relic slot optimizations, performance updates 2025-12-04 18:10:30 -05:00