Windfury!: log player casts and buffs, fire on Windfury Attack casts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
dd43fd8cad
commit
75cff180cb
2 changed files with 59 additions and 0 deletions
|
|
@ -39,6 +39,7 @@ function CreateFrame(_, name)
|
|||
fr.scripts, fr.events = {}, {}
|
||||
function fr:SetScript(k, fn) self.scripts[k] = fn end
|
||||
function fr:RegisterEvent(e) self.events[e] = true end
|
||||
function fr:RegisterUnitEvent(e) self.events[e] = true end
|
||||
function fr:UnregisterEvent(e) self.events[e] = nil end
|
||||
function fr:CreateTexture() return region() end
|
||||
function fr:CreateMaskTexture() return region() end
|
||||
|
|
@ -135,5 +136,22 @@ SlashCmdList.WINDFURY("sound on")
|
|||
SlashCmdList.WINDFURY("")
|
||||
assert(not printed[#printed]:find("Scrolling Combat Text"))
|
||||
|
||||
-- Debug log: casts and auras by name; a "Windfury Attack" cast fires the show.
|
||||
C_Spell = { GetSpellName = function(id) return ({ [8517] = "Windfury Attack", [133] = "Fireball" })[id] end }
|
||||
local dbg
|
||||
for _, fr in ipairs(frames) do if fr.events.PLAYER_LOGIN then dbg = fr end end
|
||||
dbg.scripts.OnEvent(dbg, "PLAYER_LOGIN")
|
||||
assert(WindfuryDB.debug.fct == true)
|
||||
run(5)
|
||||
local procs = WindfuryDB.procs
|
||||
dbg.scripts.OnEvent(dbg, "UNIT_SPELLCAST_SUCCEEDED", "player", "guid", 133)
|
||||
assert(not overlay.shown and WindfuryDB.debug.casts["133 Fireball"] == 1)
|
||||
dbg.scripts.OnEvent(dbg, "UNIT_SPELLCAST_SUCCEEDED", "player", "guid", 8517)
|
||||
assert(overlay.shown and WindfuryDB.procs == procs + 1)
|
||||
dbg.scripts.OnEvent(dbg, "UNIT_SPELLCAST_SUCCEEDED", "player", "guid", st)
|
||||
assert(WindfuryDB.debug.casts.secret == 1)
|
||||
dbg.scripts.OnEvent(dbg, "UNIT_AURA", "player", { addedAuras = { { spellId = 1, name = "Flurry" }, { spellId = st, name = "x" } } })
|
||||
assert(WindfuryDB.debug.auras["1 Flurry"] == 1 and WindfuryDB.debug.auras.secret == 1)
|
||||
|
||||
print = _G.print
|
||||
io.write("ok\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue