Bagnon

Bagnon

132M Downloads

Bags not opening in SoD

thezephyrsong opened this issue ยท 23 comments

commented

Is there an existing issue for this?

  • I have searched the existing open and closed issues.

Description

New 1.15.7 patch has broken bagnon

Bagnon Version

11.1.9

World of Warcraft Flavor

Classic Era

World of Warcraft Region

US/NA

Tested with only Bagnon

I got this issue with only Bagnon enabled

Lua Error

12x ...rfaceBagBrother/core/classes/playerMoney.lua:48: attempt to index global 'MoneyTypeInfo' (a nil value)
[BagBrother/core/classes/playerMoney.lua]:48: in function 'Construct'
[BagBrother/libs/Poncho-2.0-5/Poncho-2.0.lua]:81: in function <...aceBagBrother/libs/Poncho-2.0/Poncho-2.0.lua:75>
[tail call]: ?
[BagBrother/core/classes/parented.lua]:10: in function <BagBrother/core/classes/parented.lua:9>
[tail call]: ?
[BagBrother/core/classes/playerMoney.lua]:26: in function <...rfaceBagBrother/core/classes/playerMoney.lua:25>
[tail call]: ?
[BagBrother/core/classes/frameBase.lua]:125: in function 'GetWidget'
[Bagnon/src/frame.lua]:251: in function <Bagnon/src/frame.lua:248>
[tail call]: ?
[Bagnon/src/frame.lua]:54: in function 'Layout'
[BagBrother/core/classes/frameBase.lua]:58: in function 'Update'
...[BagBrother/frames/inventory/inventory.lua]:27: in function <...aceBagBrother/frames/inventory/inventory.lua:26>
[C]: in function 'Show'
[BagBrother/core/api/frames.lua]:32: in function 'Show'
[BagBrother/core/api/frames.lua]:24: in function <BagBrother/core/api/frames.lua:23>
[tail call]: ?
[tail call]: ?
[BagBrother/core/features/autoDisplay.lua]:83: in function <...faceBagBrother/core/features/autoDisplay.lua:82>
[C]: in function 'ToggleBackpack'
[Blizzard_MainMenuBarBagButtons/Classic/MainMenuBarBagButtons.lua]:54: in function 'BackpackButton_OnClick'
[*MainMenuBarBagButtons.xml:118_OnClick]:4: in function <[string "*MainMenuBarBagButtons.xml:118_OnClick"]:1>

Locals:
self = <table> {
 __super = <table> {
 }
 __base = <table> {
 }
 __index = <table> {
 }
 __name = "BagnonPlayerMoney"
 Type = "PLAYER"
 __frames = <table> {
 }
 __type = "Button"
 __count = 1
 __template = "SmallMoneyFrameTemplate"
 Gray = "|cff999999%s|r"
}
f = BagnonPlayerMoney1 {
 GoldButton = BagnonPlayerMoney1GoldButton {
 }
 vadjust = 0
 trialErrorButton = BagnonPlayerMoney1TrialErrorButton {
 }
 CopperButton = BagnonPlayerMoney1CopperButton {
 }
 moneyType = "PLAYER"
 moneyWidth = 126.370377
 info = <table> {
 }
 staticMoney = 10238892
 SilverButton = BagnonPlayerMoney1SilverButton {
 }
 small = 1
}
overlay = Button {
}
(*temporary) = nil
(*temporary) = "PLAYER"
(*temporary) = "anyUp"
(*temporary) = "attempt to index global 'MoneyTypeInfo' (a nil value)"
Money = <table> {
 __super = <table> {
 }
 __base = <table> {
 }
 __index = <table> {
 }
 __name = "BagnonPlayerMoney"
 Type = "PLAYER"
 __frames = <table> {
 }
 __type = "Button"
 __count = 1
 __template = "SmallMoneyFrameTemplate"
 Gray = "|cff999999%s|r"
}

Reproduction Steps

Try to open bag

Last Working Version

11.1.9

Screenshots

No response

commented

Same exact issue here. Worked fine at launch of patch, no longer works now.

There was a mini patch about an hour ago. Bagnon worked fine earlier today, but after this patch it broke.

commented

Same exact issue here. Worked fine at launch of patch, no longer works now.

commented

Also dropping in to say I'm seeing the same issue. Disabling the add-on I can open the base bags.

commented

Asked the chat in a major city about this, everyone is having this problem with Bagnon at the moment. I guess as someone said above, that small patch must've broke it.

commented

came here to say it worked earlier today on classic, now doesn't but disabling money in option allows it to work - just doesn't show gold

commented

Image

Disabling "Money" here fixed this for me

Confirmed, thank you.

commented

I have a simple fix that will allow you to use the addon. Not sure what else it will break, though. Use at your own risk.

Edit file \Bagbrother\core\classes\playerMoney.lua

change line 48
f.info = 0--MoneyTypeInfo[f.Type]

comment out line 61
--MoneyFrame_Update(self:GetName(), money, money == 0)

Good luck!

-Snow

commented

Thank you kind soul, this worked! Long shot, but could you work your magic on Auctioneer?

commented

Same issue in Retail.

commented

@snowfan84 Thanks!

commented

This issue also appears in Cata Classic

commented

It was working earlier today just fine on Retial. I just had a small game update this evening and now it doesn't work. Blizzard must have changed something

commented

Image

Disabling "Money" here fixed this for me

commented

Disabling money does seem to work, for bags, but I can't seem to get bank to show still.

commented

Disabling money does seem to work, for bags, but I can't seem to get bank to show still.

Need to disable money on all frames for the others to work 'bank' etc

commented

Ah, duh. Thank you, Logandros.

commented

Having the same issue on WoW SoD and Anni

commented

[Edit]: Seems fine while clearing SavedVariables too, then editing the line as in the fix

commented

Switched to Baganator addon, problem solved.

commented

Same issued. Also switched to Baganator temporarily till I hope Bagnon gets fixed. I much prefer Bagnon over Baganator!

commented

I just realized that because we call MoneyTypeInfo further down a better fix to just fully rebuild the table at the top of the file. Realistically I am sure you don't need all of the types but I included them all just to be safe (probably we only needed PLAYER:

--- Remake MoneyTypeInfo data table
local function buildMoneyTypeInfo()
	local types = {
		"PLAYER",
		"ACCOUNT",
		"STATIC",
		"QUEST_REWARDS",
		"AUCTION",
		"AUCTION_TOOLTIP",
		"PLAYER_TRADE",
		"TARGET_TRADE",
		"SEND_MAIL",
		"SEND_MAIL_COD",
		"GUILDBANK",
		"GUILDBANKWITHDRAW",
		"GUILD_REPAIR",
		"TOOLTIP",
		"BLACKMARKET",
		"GUILDBANKCASHFLOW",
		"REFORGE"
	}
	local fields = {
		"OnloadFunc",
		"UpdateFunc",
		"PickupFunc",
		"DropFunc",
		"collapse",
		"canPickup",
		"showSmallerCoins",
		"checkGoldThreshold",
		"fixedWidth",
		"truncateSmallCoins",
		"align"
	}
	local moneyTypeTable = {}
	for _, type in ipairs(types) do
		if GetMoneyTypeInfoField(type, "collapse") then
			moneyTypeTable[type] = {}
			for _,field in ipairs(fields) do
				moneyTypeTable[type][field] = GetMoneyTypeInfoField(type, field) or nil
			end
		end
	end
	return moneyTypeTable
end
local MoneyTypeInfo = buildMoneyTypeInfo()

I reverted my previous change and just stuck this on line 11, just under MoneyFrame.Type = 'PLAYER'. This way the rest of the code should function as if MoneyTypeInfo was still directly accessible from the LUA template.

commented

@Jaliborc I am sure you are aware but this seems to be due to large changes in the XML/LUA templates. Namely in the MoneyFrame.lua template file MoneyTypeInfo has been changed to a local variable, and instead a GetMoneyTypeInfoField(moneyType, field) method is provided to get each field individually, see: Interface/AddOns/Blizzard_MoneyFrame/Shared/MoneyFrame.lua

I wrote a quick fix for the Classic addon that preserves the full MoneyTypeInfo functionality, I expect it works the same for Retail. In function MoneyFrame:Construct() in Bagbrother/addons/core/classes/money.lua I changed:

f.info = MoneyTypeInfo[f.Type]

And instead replaced it with:

local moneyTypeInfoTable = {}
local moneyTypeInfoFields = {
	"OnloadFunc",
	"UpdateFunc",
	"PickupFunc",
	"DropFunc",
	"collapse",
	"canPickup",
	"showSmallerCoins",
	"checkGoldThreshold",
	"fixedWidth",
	"truncateSmallCoins",
	"align"
}
for _,field in ipairs(moneyTypeInfoFields) do
	local info = GetMoneyTypeInfoField(f.Type, moneyTypeInfoFields) or nil
	if info then
		moneyTypeInfoTable[field] = info
	end
end
f.info = moneyTypeInfoTable

Essentially I just build the table again field by field. There is probably a cleaner way to do this but it works for now!

commented

I just realized that because we call MoneyTypeInfo further down a better fix to just fully rebuild the table at the top of the file. Realistically I am sure you don't need all of the types but I included them all just to be safe (probably we only needed PLAYER:

--- Remake MoneyTypeInfo data table
local function buildMoneyTypeInfo()
	local types = {
		"PLAYER",
		"ACCOUNT",
		"STATIC",
		"QUEST_REWARDS",
		"AUCTION",
		"AUCTION_TOOLTIP",
		"PLAYER_TRADE",
		"TARGET_TRADE",
		"SEND_MAIL",
		"SEND_MAIL_COD",
		"GUILDBANK",
		"GUILDBANKWITHDRAW",
		"GUILD_REPAIR",
		"TOOLTIP",
		"BLACKMARKET",
		"GUILDBANKCASHFLOW",
		"REFORGE"
	}
	local fields = {
		"OnloadFunc",
		"UpdateFunc",
		"PickupFunc",
		"DropFunc",
		"collapse",
		"canPickup",
		"showSmallerCoins",
		"checkGoldThreshold",
		"fixedWidth",
		"truncateSmallCoins",
		"align"
	}
	local moneyTypeTable = {}
	for _, type in ipairs(types) do
		if GetMoneyTypeInfoField(type, "collapse") then
			moneyTypeTable[type] = {}
			for _,field in ipairs(fields) do
				moneyTypeTable[type][field] = GetMoneyTypeInfoField(type, field) or nil
			end
		end
	end
	return moneyTypeTable
end
local MoneyTypeInfo = buildMoneyTypeInfo()

I reverted my previous change and just stuck this on line 11, just under MoneyFrame.Type = 'PLAYER'. This way the rest of the code should function as if MoneyTypeInfo was still directly accessible from the LUA template.

This would work for Classic but incomplete for Retail, it would just duplicate player money in the Warband bank (fyi)