Skip to content

fix: TBC Anniversary patch 2.5.6 (Interface 20506) compatibility - #73

Closed
kyleian wants to merge 1 commit into
Nevcairiel:classicfrom
kyleian:fix/2506-DebuffTypeColor-compat
Closed

fix: TBC Anniversary patch 2.5.6 (Interface 20506) compatibility#73
kyleian wants to merge 1 commit into
Nevcairiel:classicfrom
kyleian:fix/2506-DebuffTypeColor-compat

Conversation

@kyleian

@kyleian kyleian commented Jul 14, 2026

Copy link
Copy Markdown

Problem

TBC Anniversary patch 2.5.6 (Interface 20506) removed the DebuffTypeColor global table and replaced it with individual DEBUFF_TYPE_*_COLOR constants. Any reference to DebuffTypeColor now returns nil, which causes the following error on every FullUpdate call:

auras.lua:562: attempt to index global 'DebuffTypeColor' (a nil value)

This aborts the entire unit frame update, leaving target frames with no names, no bars, and no buffs/debuffs shown.

Solution

Reconstruct DebuffTypeColor from the new per-school constants in ExternalAPI.lua (which is loaded first per the TOC), guarded by if not DebuffTypeColor then so the shim is a no-op on older client versions that still provide the global.

Keys reconstructed:

  • .none / [""] — fallback used in auras.lua and highlight.lua
  • "Magic", "Curse", "Disease", "Poison" — school types returned by UnitAura

Both TOC files also add 20506 to the ## Interface list so the client loads the addon without an out-of-date warning.

Files changed

File Change
ExternalAPI.lua Add DebuffTypeColor compat shim (guarded by if not DebuffTypeColor)
ShadowedUnitFrames.toc Add 20506 to ## Interface list
options/ShadowedUF_Options.toc Add 20506 to ## Interface list

Testing

Tested on TBC Anniversary build 68575 (Interface 20506) — debuff colors, aura display, and unit frame names all work correctly after this patch.

Patch 2.5.6 removed DebuffTypeColor from the global environment and
introduced individual DEBUFF_TYPE_*_COLOR constants instead. This
caused auras.lua:562 to error on every FullUpdate, breaking debuff
coloring and leaving target frames without names or buffs.

Changes:
- ExternalAPI.lua: reconstruct DebuffTypeColor from the new per-type
  constants if the global is absent, so all existing references in
  auras.lua, health.lua and highlight.lua continue to work unchanged.
- ShadowedUnitFrames.toc: add 20506 to the ## Interface list so the
  client recognises the addon as compatible with patch 2.5.6.
- options/ShadowedUF_Options.toc: same Interface list update.
@kyleian

kyleian commented Jul 20, 2026

Copy link
Copy Markdown
Author

Closing in favor of #74, which takes the correct approach.

#74 adds ShadowUF.API.GetDebuffTypeColor() as a namespaced helper rather than reconstructing DebuffTypeColor as a global, updates all three actual call sites (auras.lua, health.lua, highlight.lua), handles Bleed which this PR missed, and passes the repository luacheck configuration with 0 warnings. The global-reconstruction approach here is also fragile — a future patch could remove additional globals and the pattern would have to be repeated.

#74 is the better fix.

@kyleian kyleian closed this Jul 20, 2026
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