some debug

This commit is contained in:
Jrc13245
2026-03-09 15:37:51 -04:00
parent 69b9c08a2b
commit ff73210d2d
3 changed files with 54 additions and 1 deletions
+45
View File
@@ -3572,6 +3572,25 @@ function CleveRoids.ValidateAura(unit, args, isbuff)
if isPlayer then
local buffIndex = gufSlot - 1
stacks = GetPlayerBuffApplications(buffIndex)
-- Hidden auras can shift visible buff positions, causing
-- gufSlot-1 to not match the GetPlayerBuff index. When
-- stacks look wrong, scan GetPlayerBuff to find the
-- correct buff ID by spell ID and get accurate stacks.
if (not stacks or stacks <= 1) and gufSpellId and _G.GetPlayerAuraDuration then
for si = 0, 31 do
local sbid = GetPlayerBuff(si, "HELPFUL")
if sbid < 0 then break end
local sid = _G.GetPlayerAuraDuration(sbid)
if sid and sid == gufSpellId then
local verified = GetPlayerBuffApplications(sbid)
if verified and verified > (stacks or 0) then
stacks = verified
buffIndex = sbid
end
break
end
end
end
if not stacks or stacks == 0 then
stacks = gufStacks or 0
end
@@ -3602,6 +3621,24 @@ function CleveRoids.ValidateAura(unit, args, isbuff)
if isPlayer then
local buffIndex = gufSlot - 1
stacks = GetPlayerBuffApplications(buffIndex)
-- Hidden auras can shift visible buff positions (see buff path above)
if (not stacks or stacks <= 1) and gufSpellId and _G.GetPlayerAuraDuration then
local debuffFilter = gufSlot > 32 and "HARMFUL" or "HELPFUL"
local maxSlot = gufSlot > 32 and 47 or 31
for si = 0, maxSlot do
local sbid = GetPlayerBuff(si, debuffFilter)
if sbid < 0 then break end
local sid = _G.GetPlayerAuraDuration(sbid)
if sid and sid == gufSpellId then
local verified = GetPlayerBuffApplications(sbid)
if verified and verified > (stacks or 0) then
stacks = verified
buffIndex = sbid
end
break
end
end
end
if not stacks or stacks == 0 then
stacks = gufStacks or 0
end
@@ -3930,6 +3967,14 @@ function CleveRoids.ValidateAura(unit, args, isbuff)
elseif isPlayer and not args.checkStacks and args.amount and ops[args.operator] then
return cmp[args.operator](remaining or -1, args.amount)
elseif args.amount and args.checkStacks and ops[args.operator] then
if CleveRoids.debug then
DEFAULT_CHAT_FRAME:AddMessage(string.format(
"|cffff9900[StackCheck]|r %s: found=%s, stacks=%s, %s %s = %s",
tostring(args.name), tostring(found), tostring(stacks),
args.operator, tostring(args.amount),
cmp[args.operator](stacks or -1, args.amount) and "|cff00ff00PASS|r" or "|cffff0000FAIL|r"
))
end
return cmp[args.operator](stacks or -1, args.amount)
elseif not isPlayer and not args.checkStacks and args.amount and ops[args.operator] then
-- Non-player aura time comparison: use tracked time or treat as 0 if found/-1 if missing
+8
View File
@@ -2085,6 +2085,14 @@ function CleveRoids.ParseMsg(msg)
-- accept decimals too; capture name/op/amount
local _, _, name, operator, amount = string.find(arg_for_find, "([^>~=<]*)([>~=<]+)(#?%d*%.?%d+)")
if CleveRoids.debug then
DEFAULT_CHAT_FRAME:AddMessage(string.format(
"|cffff9900[Parse]|r cond=%s arg='%s' find='%s' name=%s op=%s amt=%s",
tostring(condition), tostring(processed_arg), tostring(arg_for_find),
tostring(name), tostring(operator), tostring(amount)
))
end
if not operator or not amount then
-- No operator found, treat as simple string argument
table.insert(conditionals[condition], processed_arg)
+1 -1
View File
@@ -9,7 +9,7 @@ Enhanced macro addon for World of Warcraft 1.12.1 (Vanilla/Turtle WoW) with dyna
| Mod | Required | Purpose |
|-----|:--------:|---------|
| [Nampower](https://gitea.com/avitasia/nampower/releases) (v3.0.0+) | ✅ | Spell queueing, DBC data, auto-attack events |
| [UnitXP_SP3](https://codeberg.org/konaka/UnitXP_SP3/releases) | ❌ | Distance checks, `[multiscan]` enemy scanning |
| [UnitXP_SP3](https://codeberg.org/konaka/UnitXP_SP3/releases) | ✅ | Distance checks, `[multiscan]` enemy scanning |
## Installation