module refactoring and tooltip bugfix
This commit is contained in:
+2
-1
@@ -30,12 +30,13 @@ function LOAD()
|
|||||||
local orig = SetItemRef
|
local orig = SetItemRef
|
||||||
setglobal('SetItemRef', function(...) auto[arg] = true
|
setglobal('SetItemRef', function(...) auto[arg] = true
|
||||||
local name, _, quality = GetItemInfo(arg[1])
|
local name, _, quality = GetItemInfo(arg[1])
|
||||||
|
local ret = A(orig(unpack(arg)))
|
||||||
if not IsShiftKeyDown() and not IsControlKeyDown() and name then
|
if not IsShiftKeyDown() and not IsControlKeyDown() and name then
|
||||||
local color_code = select(4, GetItemQualityColor(quality))
|
local color_code = select(4, GetItemQualityColor(quality))
|
||||||
local link = color_code .. '|H' .. arg[1] .. '|h[' .. name .. ']|h' .. FONT_COLOR_CODE_CLOSE
|
local link = color_code .. '|H' .. arg[1] .. '|h[' .. name .. ']|h' .. FONT_COLOR_CODE_CLOSE
|
||||||
extend_tooltip(ItemRefTooltip, link, 1)
|
extend_tooltip(ItemRefTooltip, link, 1)
|
||||||
end
|
end
|
||||||
return orig(unpack(arg))
|
return ret
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user