Raven

2M Downloads

Wrath Classic C_AddOns error

Road-block opened this issue ยท 5 comments

commented

The C_AddOns namespace exists in Wrath Classic but in a rudimentary version.

It only contains the GetAddOnMetadata method as of 3.4.3

Latest update r635 errors due to trying to call C_AddOns.LoadAddOn in a few places.
LoadAddOn is still a global in 3.4.3

commented

An easy fix would be to have something like this up around L:166 where the UnitAura upvalue is defined

local C_AddOns = setmetatable(_G.C_AddOns or {},{__index = _G})
commented

Thanks for the report and the fix. It's rolling out now!

commented

Thanks for the report and the fix. It's rolling out now!

Hmm, I'm not sure that fix is proper.

commented

By having it in a conditional local C_AddOns would not be available outside of the if then end scope.
It might work incidentally because setmetatable sets __index to _G on _G.C_AddOns but even if it does it's not future proof.

commented

It does work because of the reasons you described, but it's indeed not future proof. I've rewritten the fix.