Skip to content

Complete the Classic Era 1.15.9 C_AddOns fix (stacked on #320) - #321

Open
Pimptasty wants to merge 4 commits into
Rottenbeer:masterfrom
Pimptasty:classic-1.15.9-remaining-c-addons
Open

Complete the Classic Era 1.15.9 C_AddOns fix (stacked on #320)#321
Pimptasty wants to merge 4 commits into
Rottenbeer:masterfrom
Pimptasty:classic-1.15.9-remaining-c-addons

Conversation

@Pimptasty

Copy link
Copy Markdown

Please merge #320 first — this PR is stacked on top of it

This branch is built directly on @umuppetu's #320 (ffbb27a), not on master. Until #320 is merged, the diff shown here includes their two commits as well as mine. Once #320 lands, this PR's diff reduces to just the two commits below and applies cleanly.

Merge order: #320, then this. If you'd rather have it as a single PR, say so and I'll rebase onto master and fold #320's changes in with credit.

What #320 already fixes

Classic Era 1.15.9 completed the C_AddOns migration Retail did in 11.0 and removed the AddOn API globals. ItemRack.lua's first executable statement called GetAddOnMetadata, so the file aborted at load and nothing initialized — the reported symptom in #319. #320 correctly guards that, plus the ItemRackButtons.lua uses.

What this adds

Lua locals don't cross file boundaries, and #320's ItemRack.lua alias only covers GetAddOnMetadata. Three call sites still resolve to the removed globals:

File Line Call Function
ItemRack/ItemRack.lua 1946 EnableAddOn ItemRack.ToggleOptions
ItemRack/ItemRack.lua 1947 LoadAddOn ItemRack.ToggleOptions
ItemRack/ItemRackEvents.lua 280 LoadAddOn ItemRack.ToggleEvents

Both paths load the LoD ItemRackOptions, so with #320 alone the addon loads but opening the options panel or toggling events still throws attempt to call a nil value.

This uses the same guarded pattern as #320, so TBC/Wrath/Cata — which still only have the globals — resolve to them unchanged:

local LoadAddOn = (C_AddOns and C_AddOns.LoadAddOn) or LoadAddOn

I checked ItemRackOptions/ separately; it has no affected call sites.

Second commit: Interface-Vanilla bump

Classic Era is on 1.15.9 / interface 11509, while both .toc files still declare ## Interface-Vanilla: 11505, so the addon flags as out of date. Only the Vanilla line is changed in each; TBC/Wrath/Cata values are untouched. Drop this commit if you'd rather handle toc bumps in your own release commits.

Verification

  • All four Lua files compile clean under luac -p.
  • Verified against a live 1.15.9 (build 68940) Classic Era client that C_AddOns.GetAddOnMetadata, .LoadAddOn and .EnableAddOn all exist and are in active use by other addons on that client.
  • Confirmed by inspection that every one of the six affected call sites across the three files now has a matching file-level alias in scope.
  • I have not yet exercised the options-panel and toggle-events paths in-game post-patch; the fix is a direct like-for-like substitution, but calling that out rather than claiming more than I've run.

Refs #319. Does not touch the binding/macro changes proposed in #318.

🤖 Generated with Claude Code

umuppetu and others added 4 commits July 22, 2026 16:46
Attempting fix for Classic 1.15.9, which appears to have adopted more of Retail's namespaced AddOn API. GetAddOnMetadata is no longer available as a global, so this line explodes during addon initialization. This is exactly the same class of breakage that happened on Retail in 11.0 when Blizzard moved APIs into C_AddOns
Attempting fix for Classic 1.15.9, which appears to have adopted more of Retail's namespaced AddOn API. GetAddOnMetadata is no longer available as a global, so this line explodes during addon initialization. This is exactly the same class of breakage that happened on Retail in 11.0 when Blizzard moved APIs into C_AddOns
Rottenbeer#320 aliases GetAddOnMetadata in ItemRack.lua and the AddOn API in
ItemRackButtons.lua, which stops the load-time crash. Three call sites
are still left resolving to the removed globals, because Lua locals do
not cross file boundaries:

- ItemRack.lua:1946-1947  EnableAddOn / LoadAddOn in ItemRack.ToggleOptions
- ItemRackEvents.lua:280  LoadAddOn in ItemRack.ToggleEvents

Both paths load the LoD ItemRackOptions addon, so on 1.15.9 opening the
options panel or toggling events still errors with "attempt to call a
nil value" even with Rottenbeer#320 applied.

Adds the matching aliases using the same guarded pattern as Rottenbeer#320, so
TBC/Wrath/Cata, which still only have the globals, are unaffected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Classic Era is on 1.15.9 (build 68940, interface 11509); the Vanilla
directive still declared 11505, so the addon shows as out of date.

Only the Interface-Vanilla line is touched - TBC, Wrath and Cata keep
their current values.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

2 participants