mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- Fixed an error when an item slot was specified that the user had no item equipped in.
This commit is contained in:
@ -670,9 +670,12 @@ function IceCustomCDBar.prototype:UpdateIcon()
|
|||||||
self.barFrame.icon:SetTexture(icon)
|
self.barFrame.icon:SetTexture(icon)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local name, _, _, _, _, _, _, _, _, texture = GetItemInfo(GetInventoryItemID("player", GetInventorySlotInfo(validInventorySlotNames[self.moduleSettings.itemToTrack])))
|
local itemId = GetInventoryItemID("player", GetInventorySlotInfo(validInventorySlotNames[self.moduleSettings.itemToTrack]))
|
||||||
if name and texture then
|
if itemId then
|
||||||
self.barFrame.icon:SetTexture(texture)
|
local name, _, _, _, _, _, _, _, _, texture = GetItemInfo(itemId)
|
||||||
|
if name and texture then
|
||||||
|
self.barFrame.icon:SetTexture(texture)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user