We need the metadata of itemlinks to be accurate
Adrian L Lange [01-08-15 - 11:16]
We need the metadata of itemlinks to be accurate
Fixes #13
diff --git a/BonusRollPreview.lua b/BonusRollPreview.lua
index 04e3e23..a830a85 100644
--- a/BonusRollPreview.lua
+++ b/BonusRollPreview.lua
@@ -152,7 +152,7 @@ local function HandlePosition()
end
local function ItemButtonUpdate(self, elapsed)
- if(IsModifiedClick('COMPAREITEMS') or (GetCVarBool('alwaysCompareItems') and not IsEquippedItem(self.itemID))) then
+ if(IsModifiedClick('COMPAREITEMS') or (GetCVarBool('alwaysCompareItems') and not IsEquippedItem(self.itemLink))) then
GameTooltip_ShowCompareItem()
else
ShoppingTooltip1:Hide()
@@ -172,7 +172,7 @@ end
local function ItemButtonEnter(self)
GameTooltip:SetOwner(self, 'ANCHOR_TOPLEFT')
- GameTooltip:SetItemByID(self.itemID)
+ GameTooltip:SetHyperlink(self.itemLink)
self:SetScript('OnUpdate', ItemButtonUpdate)
end
@@ -250,7 +250,6 @@ function Container:Populate()
ItemButton.Slot:SetText(slot)
ItemButton.Class:SetText(itemClass)
- ItemButton.itemID = itemID
ItemButton.itemLink = itemLink
ItemButton:Show()