TBC Edits, detailed in TBC-Fixes.MD #37
Open
+194
−7
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.
Description
This PR fixes KillTrack addon compatibility with modern World of Warcraft clients (10.x / Dragonflight and later).
The addon was failing to load due to deprecated/removed Blizzard API functions. The following errors were addressed:
KillTrack.lua:33: attempt to call global 'GetAddOnMetadata' (a nil value)MobList.lua:29: attempt to index field 'Sort' (a nil value)Options.lua:257: attempt to call global 'InterfaceOptions_AddCategory' (a nil value)Command.lua:68: attempt to call method 'Msg' (a nil value)Fix 1: GetAddOnMetadata API Change
File:
KillTrack.lua(Line ~33)In WoW 10.0 (Dragonflight), Blizzard moved
GetAddOnMetadatainto theC_AddOnsnamespace. Added a compatibility shim that checks ifC_AddOns.GetAddOnMetadataexists (modern API) and uses it; otherwise falls back to the old globalGetAddOnMetadata.Fix 2: KT.Sort Load Order Issue
File:
MobList.lua(Line 29)Due to the TOC file load order,
MobList.luawas executed beforeKillTrack.luafinished. InitializedSorttoniland deferred the actual value assignment to runtime. TheUpdateMobs()function already has fallback logic that handles this case.Fix 3: Interface Options API Removal
File:
Options.lua(Lines ~65-81, ~257-267)WoW 10.0 completely replaced the old Interface Options system with a new Settings API. Added compatibility for:
Settings.RegisterCanvasLayoutCategory()+Settings.RegisterAddOnCategory()(replacesInterfaceOptions_AddCategory())Settings.OpenToCategory()(replacesInterfaceOptionsFrame_OpenToCategory())SettingsPanel(replacesInterfaceOptionsFrame)Fix 4: KT:Msg Nil Error (Cascading Failure)
File:
Command.lua(Line 68)This was a cascading failure caused by Fix #1. Fixing the root cause automatically resolved this error.
Summary of API Changes (WoW 10.0+)
GetAddOnMetadata()C_AddOns.GetAddOnMetadata()InterfaceOptions_AddCategory()Settings.RegisterCanvasLayoutCategory()+Settings.RegisterAddOnCategory()InterfaceOptionsFrame_OpenToCategory()Settings.OpenToCategory()InterfaceOptionsFrameSettingsPanelMotivation and Context
The KillTrack addon was completely broken on modern WoW clients (10.x+) due to Blizzard removing/renaming several core API functions. These fixes restore full functionality while maintaining backward compatibility with older WoW versions.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: