refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-09-06 19:27:25 +02:00
parent ad4aa1afb2
commit f51d99134e
3 changed files with 33 additions and 14 deletions
+1 -2
View File
@@ -29,14 +29,13 @@ function LOAD()
end
local orig = SetItemRef
setglobal('SetItemRef', function(...) auto[arg] = true
local result = orig(unpack(arg))
local name, _, quality = GetItemInfo(arg[1])
if not IsShiftKeyDown() and not IsControlKeyDown() and name then
local color_code = select(4, GetItemQualityColor(quality))
local link = color_code .. '|H' .. arg[1] .. '|h[' .. name .. ']|h' .. FONT_COLOR_CODE_CLOSE
extend_tooltip(ItemRefTooltip, link, 1)
end
return result
return orig(unpack(arg))
end)
end