Bagnon

Bagnon

127M Downloads

Error with bag type coloring

hobulian opened this issue ยท 2 comments

commented

Running Software (issues missing this information will be deleted):

  • Addon version: 9.2.4-9.2.7
  • Server patch: 9.2.7

Have you read the changelog? (please don't waste our time)
Yeah.

Describe the bug

12x ...faceBagnon\common\Wildpants\classes\item.lua:274: attempt to index local 'color' (a boolean value)
[string "@Bagnon\common\Wildpants\classes\item.lua"]:274: in function `UpdateSlotColor'
[string "@Bagnon\common\Wildpants\classes\item.lua"]:202: in function `Update'
[string "@Bagnon\common\Wildpants\classes\item.lua"]:40: in function <...faceBagnon\common\Wildpants\classes\item.lua:34>
[string "@Bagnon_Facade\Bagnon_Facade-8.3.0.lua"]:36: in function <Bagnon_Facade\Bagnon_Facade.lua:35>
[string "=(tail call)"]: ?
[string "@Bagnon\common\Wildpants\classes\itemGroup.lua"]:124: in function `func'
[string "@Bagnon\common\Wildpants\libs\MutexDelay-1.0\MutexDelay-1.0-2.lua"]:36: in function <...mon\Wildpants\libs\MutexDelay-1.0\MutexDelay-1.0.lua:30>

Locals:
self = ContainerFrame3Item13 {
 0 = <userdata>
 SetItem = <function> defined @FrameXML\ItemButtonTemplate.lua:355
 GetSlotType = <function> defined @Bagnon\common\Wildpants\classes\item.lua:443
 IconOverlay = <unnamed> {
 }
 SlotTypes = <table> {
 }
 Super = <function> defined @Bagnon\common\Wildpants\libs\Poncho-2.0\Poncho-2.0.lua:157
 showMatchHighlight = true
 flashAnim = <unnamed> {
 }
 SetLocked = <function> defined @Bagnon\common\Wildpants\classes\item.lua:292
 GetTemplate = <function> defined @Bagnon\common\Wildpants\libs\Poncho-2.0\Poncho-2.0.lua:108
 IsCached = <function> defined @Bagnon\common\Wildpants\classes\parented.lua:35
 GetFrame = <function> defined @Bagnon\common\Wildpants\classes\parented.lua:39
 PostOnHide = <function> defined @FrameXML\ItemButtonTemplate.lua:269
 NewItemTexture = <unnamed> {
 }
 IsQuestItem = <function> defined @Bagnon\common\Wildpants\classes\item.lua:401
 GetBaseProfile = <function> defined @Bagnon\common\Wildpants\classes\parented.lua:27
 RegisterMessage = <function> defined @Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:90
 UnregisterMessage = <function> defined @Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:153
 Update = <function> defined @Bagnon\common\Wildpants\classes\item.lua:197
 GetInfo = <function> defined @Bagnon\common\Wildpants\classes\item.lua:431
 __Regions = <table> {
 }
 UpdateItemContextOverlay = <function> defined @FrameXML\ItemButtonTemplate.lua:307
 Count = ContainerFrame3Item13Count {
 }
 OnPreClick = <function> defined @Bagnon\common\Wildpants\classes\item.lua:143
 searchOverlay = ContainerFrame3Item13SearchOverlay {
 }
 Construct = <function> defined @Bagnon\common\Wildpants\classes\item.lua:47
 SetNormalTexture = <function> defined =[C]:-1
 SendSignal = <function> defined @Bagnon\common\Wildpants\libs\WildAddon-1.0\WildAddon-1.0.lua:82
 bag = 1
 GetTipAnchor = <function> defined @Bagnon\common\Wildpants\classes\tipped.lua:19
 __template = "ContainerFrameItemButtonTemplate"
 Flash = <unnamed> {
 }
 OnItemContextChanged = <function> defined @FrameXML\ItemButtonTemplate.lua:256
 OnItemFlashed = <function> defined @Bagnon\common\Wildpants\classes\item.lua:335
 UpdateUpgradeIcon = <function> defined @Bagnon\common\Wildpants\classes\item.lua:283
 GetSuper = <function> defined @Bagnon\common\Wildpants\libs\Poncho-2.0\Poncho-2.0.lua:104
 __MSQ_Addon = "Bagnon"
 UnregisterFrameSignal = <function> defined @Bagnon\common\Wildpants\classes\base.lua:19
 Release = <function> defined @Bagnon_Facade\Bagnon_Facade.lua:53
 Cooldown = ContainerFrame3Item13Cooldown {
 }
 Tag = "BAGNON_"
 NewClass = <function> defined @Bagnon\common\Wildpants\classes\base.lua:9
 __MSQ_Shape = "Square"
 GetOwnerInfo = <function> defined @Bagnon\common\Wildpants\classes\base.lua:32
 GetInventorySlot = <function> defined @Bagnon\common\Wildpants\classes\item.lua:448
 IsNew = <function> defined @Bagnon\common\Wildpants\classes\item.lua:419
 FlashFind = <function> defined @Bagnon\common\Wildpants\classes\item.lua:328
 GetItemID = <function> defined @FrameXML\ItemButtonTemplate.lua:399
 IsPaid = <function> defined @Bagnon\common\Wildpants\classes\item.lua:423
 __index = <table> {
 }
 __name = "BagnonItem"
 Stock = ContainerFrame3Item13Stock {
 }
 RegisterSignal = <function> defined @Bagnon\common\Wildpants\libs\WildAddon-1.0\WildAddon-1.0.lua:74
 GetItemLink = <function> defined @FrameXML\ItemButtonTemplate.lua:414
 IsActive = <function> defined @Bagnon\common\Wildpants\libs\Poncho-2.0\Poncho-2.0.lua:153
 GetItemInfo = <function> defined @

To Reproduce
Steps to reproduce the behaviour:
Dunno option texts in english since my language is korean so i translated it direct into eng.
Bagnon Option -> Color Setting -> toggle off coloring empty cells by bag type.

Expected behaviour
Removing error even when that option is toggled off.

Screenshots
If applicable, add screenshots to help explain your problem.

commented

Bagnon Facade issue

commented

problem is r, g, b returns "false" if Addon.sets.colorSlots is false instead of returning number value. So you should change
273~ 274 line of
Bagnon\common\Wildpants\classes\item.lua

		local color = Addon.sets.colorSlots and Addon.sets[self:GetSlotType() .. 'Color']
		local r,g,b = color[1] or 1, color[2] or 1, color[3] or 1

to

		local color = Addon.sets.colorSlots and Addon.sets[self:GetSlotType() .. 'Color'] or {1, 1, 1}
		local r,g,b = color[1] , color[2], color[3]

I think.