mirror of
https://github.com/parnic/breakables.git
synced 2025-06-16 09:30:13 -05:00
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:
@ -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)
|
||||
|
@ -1,3 +1,7 @@
|
||||
v1.9.6:
|
||||
|
||||
- Fix lockboxes in 10.0.2
|
||||
|
||||
v1.9.5:
|
||||
|
||||
- Fix another error from 10.0.2
|
||||
|
Reference in New Issue
Block a user