BulwarkFrame - compact Earthen Bulwark readout for TurtleWoW

This commit is contained in:
2026-08-05 15:54:49 +02:00
commit 7cd508e2a3
17 changed files with 1990 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
-- BulwarkFrame -- environment guard.
--
-- SuperWoW is a HARD requirement, not a nice-to-have. Two of the three things this addon does
-- have no honest fallback without it:
--
-- * identifying the buffer aura by SPELL ID (GetPlayerBuffID). The alternative is matching
-- on the texture path, which several unrelated auras share -- that produces a readout that
-- is confidently wrong rather than absent, which is worse.
-- * resetting the swing on UNIT_CASTEVENT (arg3 = "MAINHAND"/"OFFHAND"). Without it the only
-- route is parsing localised combat-log strings, which breaks on any client whose locale
-- or strings differ.
--
-- So there is deliberately no bypass switch. An addon that draws a plausible but wrong number
-- is worse than one that says it cannot run.
--
-- SUPERWOW_VERSION is set before any addon loads, so this can be evaluated at module scope --
-- unlike nampower and UnitXP, which are only detectable once in the world. Neither is used
-- here; if that changes, their detection has to move to a later event.
BulwarkFrameEnv = {}
local E = BulwarkFrameEnv
E.MESSAGE = "BulwarkFrame: SuperWoW is required and was not detected -- staying inactive. "
.. "The buffer pool is read by spell id, which needs SuperWoW."
-- check(superwowVersion) -> ok(boolean), message(string or nil). PURE.
--
-- Presence is a plain nil check, matching what the other addons in this ecosystem do
-- (`SUPERWOW_VERSION ~= nil`). A stricter test would risk rejecting a valid SuperWoW that
-- reports its version in an unexpected shape.
function E.check(superwowVersion)
if superwowVersion ~= nil then return true, nil end
return false, E.MESSAGE
end