Skip to content

Fix TBC 2.5.6 debuff color compatibility - #74

Open
autyan wants to merge 1 commit into
Nevcairiel:classicfrom
autyan:fix/tbc-20506-debuff-colors
Open

Fix TBC 2.5.6 debuff color compatibility#74
autyan wants to merge 1 commit into
Nevcairiel:classicfrom
autyan:fix/tbc-20506-debuff-colors

Conversation

@autyan

@autyan autyan commented Jul 19, 2026

Copy link
Copy Markdown

Problem

TBC Anniversary 2.5.6 removed the global DebuffTypeColor table. SUF indexes it in the aura, health, and highlight modules, so an aura update can abort and leave unit-frame content or debuffs stale.

A runtime probe from zhCN client 2.5.6.68775 / Interface 20506 confirms:

  • DebuffTypeColor = nil
  • UnitAura = function
  • DEBUFF_TYPE_NONE_COLOR, MAGIC, CURSE, DISEASE, POISON, and the new BLEED color constants are tables

The UnitAura observation is an existence/type check only. It does not establish that its return tuple is semantically unchanged from 2.5.5. This PR therefore does not modify the aura query path; tuple parity should be verified separately against C_UnitAuras.GetAuraDataByIndex before introducing a wrapper.

Change

  • Add ShadowUF.API.GetDebuffTypeColor as a compatibility boundary instead of recreating a Blizzard global.
  • Prefer the legacy table where it still exists.
  • Fall back to the individual 2.5.6 color constants, including Bleed.
  • Always return the none color for unknown aura types.
  • Route the three existing color consumers through the helper.
  • Register the constants in .luacheckrc.
  • Add Interface 20506 to both TOCs.

This keeps the patch limited to the confirmed aura-color breakage and TOC metadata.

This overlaps with #73, but additionally handles DEBUFF_TYPE_BLEED_COLOR, avoids mutating _G, makes the existing auras.lua lookup safe for an unknown non-nil aura type, and passes the repository luacheck configuration with the new globals.

Verification

  • Repository luacheck configuration: 0 warnings / 0 errors across 40 files.
  • luac -p passes for all changed Lua files.
  • Mocked 2.5.6 path: Magic, Bleed, and unknown types return the expected colors with DebuffTypeColor = nil.
  • Mocked legacy path: the existing DebuffTypeColor entries remain authoritative.

@autyan
autyan force-pushed the fix/tbc-20506-debuff-colors branch from 2da9aa0 to 711bd36 Compare July 19, 2026 03:55
@autyan

autyan commented Jul 19, 2026

Copy link
Copy Markdown
Author

Additional in-client semantic check on zhCN TBC Anniversary 2.5.6.68775:

  • UnitAura and C_UnitAuras.GetAuraDataByIndex were both callable.
  • Sample: player/HELPFUL/1, spell ID 27044.
  • The 12 legacy tuple fields consumed by SUF matched the structured AuraData fields (name through isBossAura).

This is evidence that the normal helpful-aura tuple is still compatible in 68775, but it is deliberately not presented as proof for every unit/filter combination; a target harmful sample was not captured in this run. It supports keeping this color fix independent from any broader UnitAura wrapper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant