From 8d2eb9adcd44eb5c110e154ecf80cf2532cc2200 Mon Sep 17 00:00:00 2001 From: Crum Date: Sat, 14 Jul 2018 01:00:37 -0500 Subject: [PATCH] fix LootRoll --- ElvUI/Modules/Misc/LootRoll.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ElvUI/Modules/Misc/LootRoll.lua b/ElvUI/Modules/Misc/LootRoll.lua index 3252cc1..2d3f59c 100644 --- a/ElvUI/Modules/Misc/LootRoll.lua +++ b/ElvUI/Modules/Misc/LootRoll.lua @@ -3,7 +3,7 @@ local M = E:GetModule("Misc"); --Cache global variables --Lua functions -local find = string.find +local find, match = string.find, string.match local pairs, unpack, ipairs, next, tonumber = pairs, unpack, ipairs, next, tonumber local tinsert = table.insert --WoW API / Variables @@ -12,7 +12,7 @@ local DressUpItemLink = DressUpItemLink local GetLootRollItemInfo = GetLootRollItemInfo local GetLootRollItemLink = GetLootRollItemLink local GetLootRollTimeLeft = GetLootRollTimeLeft -local IsModifiedClick = IsModifiedClick +local IsControlKeyDown = IsControlKeyDown local IsShiftKeyDown = IsShiftKeyDown local ResetCursor = ResetCursor local RollOnLoot = RollOnLoot @@ -87,12 +87,13 @@ end local function SetItemTip(frame) if not frame.link then return end + GameTooltip:SetOwner(frame, "ANCHOR_TOPLEFT") - GameTooltip:SetHyperlink(frame.link) + GameTooltip:SetHyperlink(match(frame.link, "item[%-?%d:]+")) -- if IsShiftKeyDown() then -- GameTooltip_ShowCompareItem() -- end - if IsModifiedClick("DRESSUP") then + if IsControlKeyDown() then ShowInspectCursor() else ResetCursor() @@ -276,8 +277,8 @@ function M:START_LOOT_ROLL() f.status:SetStatusBarColor(color.r, color.g, color.b, .7) f.status.bg:SetTexture(color.r, color.g, color.b) - f.status:SetMinMaxValues(0, time) - f.status:SetValue(time) + f.status:SetMinMaxValues(0, arg2) + f.status:SetValue(arg2) E:Point(f, "CENTER", WorldFrame, "CENTER") f:Show()