fix: TBC Anniversary patch 2.5.6 (Interface 20506) compatibility - #73
Closed
kyleian wants to merge 1 commit into
Closed
fix: TBC Anniversary patch 2.5.6 (Interface 20506) compatibility#73kyleian wants to merge 1 commit into
kyleian wants to merge 1 commit into
Conversation
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.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
TBC Anniversary patch 2.5.6 (Interface 20506) removed the
DebuffTypeColorglobal table and replaced it with individualDEBUFF_TYPE_*_COLORconstants. Any reference toDebuffTypeColornow returnsnil, which causes the following error on everyFullUpdatecall:This aborts the entire unit frame update, leaving target frames with no names, no bars, and no buffs/debuffs shown.
Solution
Reconstruct
DebuffTypeColorfrom the new per-school constants inExternalAPI.lua(which is loaded first per the TOC), guarded byif not DebuffTypeColor thenso the shim is a no-op on older client versions that still provide the global.Keys reconstructed:
.none/[""]— fallback used inauras.luaandhighlight.lua"Magic","Curse","Disease","Poison"— school types returned byUnitAuraBoth TOC files also add
20506to the## Interfacelist so the client loads the addon without an out-of-date warning.Files changed
ExternalAPI.luaDebuffTypeColorcompat shim (guarded byif not DebuffTypeColor)ShadowedUnitFrames.toc20506to## Interfacelistoptions/ShadowedUF_Options.toc20506to## InterfacelistTesting
Tested on TBC Anniversary build 68575 (Interface 20506) — debuff colors, aura display, and unit frame names all work correctly after this patch.