refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-27 12:09:08 +02:00
parent 77caf8c063
commit abcc782daa
2 changed files with 21 additions and 17 deletions
+4 -3
View File
@@ -2,10 +2,11 @@ aux 'tooltip' local info, disenchant, cache, money, history = aux.info, aux.dise
_G.aux_tooltip_value = true
local game_tooltip_hooks, game_tooltip_money, inside_hook = t, 0, false
local game_tooltip_hooks, game_tooltip_money = t, 0
function LOAD()
do
local inside_hook = false
for name, f in game_tooltip_hooks do
local name, f = name, f
hook(name, GameTooltip, function(...) temp=arg
@@ -31,8 +32,8 @@ function LOAD()
local result = orig(unpack(arg))
local name, _, quality = GetItemInfo(arg[1])
if not IsShiftKeyDown() and not IsControlKeyDown() and name then
local _, _, _, hex = GetItemQualityColor(quality)
local link = hex.. '|H'..arg[1]..'|h['..name..']|h'..FONT_COLOR_CODE_CLOSE
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