[WOTLK PTR Bug] IsBattlePayItem error
Jakobud opened this issue ยท 0 comments
Addon Version
v1.9.50
World of Warcraft Version
Wrath PTR
Describe the bug
Message: Interface/AddOns/AdiBags/widgets/ItemButton.lua:406: attempt to call field 'IsBattlePayItem' (a nil value)
Time: Fri Dec 9 08:54:51 2022
Count: 68
Stack: Interface/AddOns/AdiBags/widgets/ItemButton.lua:406: attempt to call field 'IsBattlePayItem' (a nil value)
[string "@Interface/AddOns/AdiBags/widgets/ItemButton.lua"]:406: in function `UpdateNew'
[string "@Interface/AddOns/AdiBags/widgets/ItemButton.lua"]:341: in function `Update'
[string "@Interface/AddOns/AdiBags/widgets/ItemButton.lua"]:315: in function `FullUpdate'
[string "@Interface/AddOns/AdiBags/widgets/ItemButton.lua"]:273: in function <Interface/AddOns/AdiBags/widgets/ItemButton.lua:261>
[string "=[C]"]: in function `Show'
[string "@Interface/AddOns/AdiBags/widgets/ContainerFrame.lua"]:1063: in function `PrepareSections'
[string "@Interface/AddOns/AdiBags/widgets/ContainerFrame.lua"]:1184: in function `FullUpdate'
[string "@Interface/AddOns/AdiBags/widgets/ContainerFrame.lua"]:616: in function <Interface/AddOns/AdiBags/widgets/ContainerFrame.lua:602>
[string "=[C]"]: ?
[string "@Interface/AddOns/AdiBags/core/Utility.lua"]:102: in function <Interface/AddOns/AdiBags/core/Utility.lua:94>
[string "@Interface/AddOns/AdiBags/widgets/LayeredRegion.lua"]:119: in function <Interface/AddOns/AdiBags/widgets/LayeredRegion.lua:108>
Locals: self = AdiBagsItemButton105 {
NormalTexture = AdiBagsItemButton105NormalTexture {
}
bag = 1
BattlepayItemTexture = Texture {
}
IconOverlay = Texture {
}
BagStaticTop = Texture {
}
IconBorder = Texture {
}
flashAnim = AnimationGroup {
}
icon = AdiBagsItemButton105IconTexture {
}
container = AdiBagsContainer1 {
}
acquired = true
UpdateTooltip = <function> defined @Interface/FrameXML/ContainerFrame_Shared.lua:1333
ExtendedOverlay = Texture {
}
UpgradeIcon = Texture {
}
NewItemTexture = Texture {
}
Cooldown = AdiBagsItemButton105Cooldown {
}
bagFamily = 0
BagStaticBottom = Texture {
}
flash = Texture {
}
ExtendedSlot = Texture {
}
IconQuestTexture = AdiBagsItemButton105IconQuestTexture {
}
hasItem = true
IconTexture = AdiBagsItemButton105IconTexture {
}
JunkIcon = Texture {
}
Stock = AdiBagsItemButton105Stock {
}
slot = 7
count = 18
section = AdiBagsSection6 {
}
filterName = "Item category"
texture = 237295
timeSinceUpgradeCheck = 0
itemLink = "[Saronite Bomb]"
Count = AdiBagsItemButton105Count {
}
itemId = 41119
0 = <userdata>
searchOverlay = AdiBagsItemButton105SearchOverlay {
}
newitemglowAnim = AnimationGroup {
}
ExtendedOverlay2 = Texture {
}
}
(*temporary) = <function> defined =[C]:-1
(*temporary) = Texture {
0 = <userdata>
}
(*temporary) = nil
(*temporary) = 1
(*temporary) = 7
(*temporary) = "attempt to call field 'IsBattlePayItem' (a nil value)"
Steps to reproduce
Open the bag while in-game.
Looks like in ItemButton.lua
IsBattlePayItem
is checked at the beginning and left as nil
if the values aren't true:
local IsBattlePayItem = C_Container and _G.C_Container.IsBattlePayItem or _G.IsBattlePayItem
In the case of WOTLK and WOTLK_PTR the value would remain as nil
.
So later in the file this line is called:
function buttonProto:UpdateNew()
self.BattlepayItemTexture:SetShown(IsBattlePayItem(self.bag, self.slot))
end
This line still needs to check whether or not IsBattlePayItem
is nil
before being executed.
Verification
- I have disabled all other addons and made sure this bug is triggered only with AdiBags enabled