Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua Error on classic Era #947

Closed
1 task done
Dragotex opened this issue Apr 19, 2023 · 2 comments
Closed
1 task done

Lua Error on classic Era #947

Dragotex opened this issue Apr 19, 2023 · 2 comments
Assignees

Comments

@Dragotex
Copy link

Dragotex commented Apr 19, 2023

Addon Version

v1.10.7

World of Warcraft Version

Classic

Describe the bug

When i load the latest Outfitter Addon from git i got this lua error:

Message: Interface\AddOns\AdiBags\core\Utility.lua:465: attempt to call field 'GetContainerItemQuestInfo' (a nil value)
Time: Wed Apr 19 03:33:38 2023
Count: 74
Stack: Interface\AddOns\AdiBags\core\Utility.lua:465: attempt to call field 'GetContainerItemQuestInfo' (a nil value)
[string "=[C]"]: in function GetContainerItemQuestInfo' [string "@interface\AddOns\AdiBags\core\Utility.lua"]:465: in function GetContainerItemQuestInfo'
[string "@interface\AddOns\AdiBags\widgets\ItemButton.lua"]:333: in function UpdateIcon' [string "@interface\AddOns\AdiBags\widgets\ItemButton.lua"]:344: in function Update'
[string "@interface\AddOns\AdiBags\widgets\ItemButton.lua"]:319: in function FullUpdate' [string "@interface\AddOns\AdiBags\widgets\ItemButton.lua"]:276: in function <Interface\AddOns\AdiBags\widgets\ItemButton.lua:264> [string "=[C]"]: in function Show'
[string "@interface\AddOns\AdiBags\widgets\ContainerFrame.lua"]:1093: in function PrepareSections' [string "@interface\AddOns\AdiBags\widgets\ContainerFrame.lua"]:1215: in function FullUpdate'
[string "@interface\AddOns\AdiBags\widgets\ContainerFrame.lua"]:643: in function <Interface\AddOns\AdiBags\widgets\ContainerFrame.lua:629>
[string "=[C]"]: ?
[string "@interface\AddOns\AdiBags\core\Utility.lua"]:106: in function <Interface\AddOns\AdiBags\core\Utility.lua:98>
[string "@interface\AddOns\AdiBags\widgets\LayeredRegion.lua"]:119: in function <Interface\AddOns\AdiBags\widgets\LayeredRegion.lua:108>

Also send this error first to the Contributor of this Outfitter release ( cdmichaelb/Outfitter#140 ) and he answerd this:

That looks to be an issue with AdiBags not fixing the GetContainerItemQuestInfo call to a C_Container.GetContainerItemQuestInfo call. The change I made took out a bunch of C_Container fixes for things Outfitter didn't use.

Steps to reproduce

happens with loaded outfitter in the moment when im open the bag

Verification

  • I have disabled all other addons and made sure this bug is triggered only with AdiBags enabled
@SpareSimian
Copy link

That API was added in 3.3.0, so maybe Classic lacks it even when using the C_Container namespace. But it's taking the C_Container path, so maybe Blizzard added C_Container in the latest Classic builds.

Here's the code that's failing:

function addon:GetContainerItemQuestInfo(containerIndex, slotIndex)
	-- This function isn't present on classic-era in any form

	if C_Container then
		local result = C_Container.GetContainerItemQuestInfo(containerIndex, slotIndex)
		return result.isQuestItem, result.questID, result.isActive
	elseif GetContainerItemQuestInfo then
		return GetContainerItemQuestInfo(containerIndex, slotIndex)
	end
end

@GovtGeek
Copy link

To temporarily fix AdiBags, try adding this in Utility.lua at line 463:

	_, _, _, toc = GetBuildInfo()
	if toc == 11403 then return nil, nil, nil end

@Cidan Cidan closed this as completed Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants