Fix lockboxes in 10.0.2

I failed to understand that GetContainerItemInfo isn't a 1:1 mapping to the new native version, so this adds a shim to make it work.
This commit is contained in:
2022-11-16 20:33:58 -06:00
parent 55c73b3505
commit d69da1a7d5
2 changed files with 13 additions and 2 deletions

View File

@ -20,7 +20,14 @@ if C_Container then
GetContainerNumSlots = C_Container.GetContainerNumSlots
end
if C_Container.GetContainerItemInfo then
GetContainerItemInfo = C_Container.GetContainerItemInfo
GetContainerItemInfo = function(bagId, slotId)
local info = C_Container.GetContainerItemInfo(bagId, slotId)
if not info then
return nil
end
return info.iconFileID, info.stackCount
end
end
if C_Container.GetContainerItemLink then
GetContainerItemLink = C_Container.GetContainerItemLink
@ -1349,7 +1356,7 @@ function Breakables:FindBreakablesInSlot(bagId, slotId)
self.myTooltip:SetOwner(WorldFrame, "ANCHOR_NONE")
end
local texture, itemCount, locked, quality, readable = GetContainerItemInfo(bagId, slotId)
local texture, itemCount = GetContainerItemInfo(bagId, slotId)
if texture then
local itemLink = GetContainerItemLink(bagId, slotId)
local itemId = self:GetItemIdFromLink(itemLink)

View File

@ -1,3 +1,7 @@
v1.9.6:
- Fix lockboxes in 10.0.2
v1.9.5:
- Fix another error from 10.0.2