Skip to content

Conversation

@CampbellTrevor
Copy link

@CampbellTrevor CampbellTrevor commented Jan 29, 2026

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:

  1. KillTrack.lua:33: attempt to call global 'GetAddOnMetadata' (a nil value)
  2. MobList.lua:29: attempt to index field 'Sort' (a nil value)
  3. Options.lua:257: attempt to call global 'InterfaceOptions_AddCategory' (a nil value)
  4. 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 GetAddOnMetadata into the C_AddOns namespace. Added a compatibility shim that checks if C_AddOns.GetAddOnMetadata exists (modern API) and uses it; otherwise falls back to the old global GetAddOnMetadata.

Fix 2: KT.Sort Load Order Issue

File: MobList.lua (Line 29)

Due to the TOC file load order, MobList.lua was executed before KillTrack.lua finished. Initialized Sort to nil and deferred the actual value assignment to runtime. The UpdateMobs() 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() (replaces InterfaceOptions_AddCategory())
  • Settings.OpenToCategory() (replaces InterfaceOptionsFrame_OpenToCategory())
  • SettingsPanel (replaces InterfaceOptionsFrame)

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+)

Old API New API
GetAddOnMetadata() C_AddOns.GetAddOnMetadata()
InterfaceOptions_AddCategory() Settings.RegisterCanvasLayoutCategory() + Settings.RegisterAddOnCategory()
InterfaceOptionsFrame_OpenToCategory() Settings.OpenToCategory()
InterfaceOptionsFrame SettingsPanel

Motivation 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?

  • Verified addon loads without errors in WoW 10.x+
  • Tested that mob kill tracking functions correctly
  • Confirmed settings panel opens and saves options properly
  • Validated backward compatibility by checking API fallback logic

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have tested my changes in-game.
    • In Retail WoW.
    • In Classic WoW.
    • In TBC Anniversary WoW.
    • In Wrath of the Lich King (Wrath/WotLK) Classic WoW.

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.

Certain mobs not counted when killed in one hit

1 participant