diff --git a/Conditionals.lua b/Conditionals.lua index 7a26b87..e8cfde7 100644 --- a/Conditionals.lua +++ b/Conditionals.lua @@ -3063,17 +3063,18 @@ function CleveRoids.GetItemCooldown(item) end function CleveRoids.ValidatePlayerAuraCount(bigger, amount) - local aura_ix = -1 - local num = 0 - while true do - aura_ix = GetPlayerBuff(num,"HELPFUL|PASSIVE") - if aura_ix == -1 then break end - num = num + 1 + -- Count player buffs by iterating all 32 slots + -- (matches IsPlayerBuffCapped logic for consistency) + local count = 0 + for i = 0, 31 do + if GetPlayerBuffTexture(GetPlayerBuff(i, "HELPFUL")) then + count = count + 1 + end end if bigger == 0 then - return num < tonumber(amount) + return count < tonumber(amount) else - return num > tonumber(amount) + return count > tonumber(amount) end end diff --git a/README.md b/README.md index ec23b29..cb4a619 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Enhanced macro addon for World of Warcraft 1.12.1 (Vanilla/Turtle WoW) with dyna | Mod | Required | Purpose | |-----|:--------:|---------| | [SuperWoW](https://github.com/balakethelock/SuperWoW/releases) | ✅ | Extended API (addon won't load without it) | -| [Nampower](https://gitea.com/avitasia/nampower/releases) (v2.23+) | ✅ | Spell queueing, DBC data access | +| [Nampower](https://gitea.com/avitasia/nampower/releases) (v2.24+) | ✅ | Spell queueing, DBC data, auto-attack events | | [UnitXP_SP3](https://codeberg.org/konaka/UnitXP_SP3/releases) | ✅ | Distance checks, `[multiscan]` enemy scanning | ## Installation @@ -90,7 +90,7 @@ All conditionals support negation with `no` prefix (e.g., `[nocombat]`, `[nobuff |-------------|---------|-------------| | `mybuff` | `[mybuff:"Name"<5]` | Player has buff (with time check) | | `mydebuff` | `[mydebuff:"Name"]` | Player has debuff | -| `mybuffcount` | `[mybuffcount:>15]` | Player buff slot count | +| `mybuffcount` | `[mybuffcount:>15]` `[nomybuffcount:>28]` | Player buff slot count (32 max) | | `buff` | `[buff:"Name">#3]` | Target has buff (with stacks) | | `debuff` | `[debuff:"Sunder">20]` | Target has debuff (with time) | | `cursive` | `[cursive:Rake<3]` | Cursive addon tracking (GUID-based) | @@ -216,6 +216,65 @@ For optimizing Slam rotations without clipping auto-attacks: /cast [nonextslamclip] Bloodthirst ``` +### Auto-Attack Conditionals (Nampower v2.24+) + +Track player melee swings and incoming attacks. Requires `NP_EnableAutoAttackEvents=1` CVar. + +| Conditional | Example | Description | +|-------------|---------|-------------| +| `lastswing` | `[lastswing]` | Any melee swing in last 5 seconds | +| `lastswing:type` | `[lastswing:crit]` | Last swing was specific type | +| `lastswing: **Note:** For pfUI users, the [jrc13245/pfUI fork](https://github.com/jrc13245/pfUI) includes native SuperCleveRoidMacros integration for proper cooldown, icon, and tooltip display on conditional macros.