SuperSwingTimer v0.3.0
What's new
v0.3.0 - 2026-11-06
Fixed
- Hunter ranged cycle no longer dies on Forever.
StartSwing("ranged")callsGetPlayerRangedHastePercent(), so the detector crash aborted every Auto Shot restart before the timer was written, while melee (which never calls that function) kept working. The detector fix removes the throw; the combat-log Auto Shot signal is also restored as a fallback for clients wherePLAYER_SWINGdoes not deliver a ranged swing, guarded by a 1 s window so one cycle is never started twice. /sst diaggains a ranged line: timer state, duration, last-swing age, auto-repeat flag, Auto Shot cooldown, lastPLAYER_SWINGranged age, last CLEU Auto Shot age, and whether the combat log is restricted.- Secret detection could fail open (in-game crash fixed). Two shortcuts added during the v0.3.0 work could report "not secret" for a genuinely restricted value: the build-level
C_Secrets.HasSecretRestrictions()fast path, and a probe self-test that returned false when the probe raised. That letns.SafeNumber(GetRangedHaste())hand a secret number tomath.max— the in-game errorattempt to perform numeric conversion on a secret number valueatSuperSwingTimer_State.lua:241(repeated every frame while the ranged bar updated). Both fail-open paths are removed.ns.IsSecretValuenow verifies behaviourally after the client probe: numbers must survivemath.max(the exact call that raises in-game —math.absdoes not raise on a restricted number and was the wrong validator), strings must survive concatenation and table indexing, tables must survive iteration. Any doubt reports "secret".ns.SafeNumberruns the documentedscrubsecretvaluessanitizer first, then converts inside a singlepcallwhose final step ismath.max(n, n). A restricted number therefore cannot be returned even whenissecretvalueanswers false.GetPlayerRangedHastePercentguards the whole getter-convert-clamp chain inpcall, so the reported line (State.lua:241) cannot raise again./sst diaggains a secrets check that reports the build restriction flag and samplesrangedHaste/attackSpeed/powerassecretorplain, so the gate can be confirmed in-game.
- WoW Forever: every secret-value call site is now gated. The v0.2.9 gate still let restricted values reach comparisons:
ns.SafeNumber(x) or tonumber(x)re-read the value afterns.SafeNumberhad already rejected it as secret. The fall-through is removed at every site inSuperSwingTimer_State.luaandSuperSwingTimer_ClassMods.lua;ns.SafeNumberis now the only conversion.UnitAttackSpeed(SecretWhenUnitStatsRestricted) is gated inSuperSwingTimer_UI.lua(ShowBars, ApplyVisibility, InitBars, UpdateOHBar) andSuperSwingTimer_ClassMods.lua(seal zone, Judgement marker, preview duration).GetRangedHasteandUnitSpellHastearithmetic is gated inSuperSwingTimer_State.luaandSuperSwingTimer_Weaving.lua.UnitCastingInfo/UnitChannelInfopayloads are scrubbed inns.GetUnitCastingSpellInfo, the ranged bar and weaving cast timing.C_Spell.GetSpellCooldownand the legacyGetSpellCooldownreturns are gated in both cooldown readers.C_UnitAuras.GetAuraDataByIndexandGetPlayerAuraBySpellIDtables are probed before any field access.UnitGUID/UnitNamecomparisons in the enemy-target path and the SoD proc listener are secret-safe.UnitClassfalls back toUnitClassBasewhen the class token is secret.
UNIT_SPELLCAST_*payloads are scrubbed throughns.Scrub(Foreverscrubsecretvalues) before any comparison, and the CLEU payload is scrubbed before identity comparisons.- Combat-log gate now uses the authoritative client query.
ns.IsRestrictedCombatLog()previously returned true wheneverC_SwingTimerexisted, silently disabling every CLEU feature on Forever. It now reports onlyC_CombatLog.IsCombatLogRestricted();PLAYER_SWINGand CLEU are independent capabilities and/sst diagreports each registration separately. - Native
PLAYER_SWINGduration is authoritative for its swing. The throttledUnitAttackSpeedsync no longer overwrites the payload duration mid-cycle (t.nativeSwingUntil). - Restricted
UnitPower/UnitHealthno longer read as 0. Energy-tick detection, the power bar and the Warrior Execute highlight skip the update instead of treating a secret as an empty pool. - Hide Blizzard Swing Bars restores the user's original CVar value instead of forcing
showSwingTimer = 1, and no longer writesshowMH/showOH/showRangedwhen the DB is not initialised. - Hunter range fallback treats
nilas "unknown" and is pcall-guarded (C_SwingTimer.IsTargetWithinSwingRangereturns nil when no check could be made). - SoD proc listener respects the combat-log restriction gate instead of registering CLEU unconditionally when a season is active.
- Secret values are passed through, not dropped. Status bars and font strings accept secret arguments from tainted code (
SecretArguments = AllowedWhenTainted), so restrictedUnitPower/UnitPowerMaxflow straight intoSetMinMaxValues/SetValue/SetFormattedText, a restricted enemyUnitNameflows intoSetText, and bar labels display secret text without ever comparing or concatenating it. Only the numeric threshold and cache comparisons are skipped. UnitPowerTypereturns are gated before they are compared or fed back intoUnitPower/UnitPowerMax(powerType/powerToken).- The CLEU payload is scrubbed field-by-field (
C_CombatLog.GetCurrentEventInfoisSecretReturns), andPLAYER_SWINGowns swing restarts and landing flashes when present so the same swing is never started twice. - The legacy
UnitAurafallback is pcall-guarded and scrubbed (it only exists behind theloadDeprecationFallbacksCVar). - Bar progress arithmetic is gated for the secret
BarValueaspect, so the spark never divides a secret value. - Build-level fast path:
C_Secrets.HasSecretRestrictions()is read once at load, so classic clients skip every secret probe and the addon pays nothing for the Forever guards.
Changed
- Version v0.3.0; the TOC and both settings-panel fallbacks move together.
Tests
- Headless suite 168 -> 173:
ForeverGate_SecretAttackSpeed_DoesNotThrow,ForeverGate_SecretSpellcastPayload_DoesNotThrow,ForeverGate_NativeSwingDuration_SurvivesSpeedSync,ForeverGate_SecretLabelText_IsPassedThrough,ForeverGate_NoSecretRestrictions_FastPath;ForeverGate_HandlePlayerSwing_StartsTimersnow asserts that a native swing timer alone does not mark the combat log restricted. - Both timing guards were proved by removing the fix and confirming the test fails.
This mod has no additional files