refactoring, bugfix

This commit is contained in:
Manuel Simon Hirsig
2016-11-09 02:08:45 +01:00
parent c7d2284b3d
commit 05fb051bd4
18 changed files with 109 additions and 99 deletions
+4 -2
View File
@@ -83,7 +83,8 @@ function SetItemRef(...)
if arg[3] ~= 'RightButton' or not index(active_tab, 'CLICK_LINK') or not strfind(arg[1], '^item:%d+') then
return orig.SetItemRef(unpack(arg))
end
for item_info in present(info.item(tonumber(select(3, strfind(arg[1], '^item:(%d+)'))))) do
local item_info = info.item(tonumber(select(3, strfind(arg[1], '^item:(%d+)'))))
if item_info then
return active_tab.CLICK_LINK(item_info)
end
end
@@ -93,7 +94,8 @@ function UseContainerItem(...)
if modified or not index(active_tab, 'USE_ITEM') then
return orig.UseContainerItem(unpack(arg))
end
for item_info in present(info.container_item(arg[1], arg[2])) do
local item_info = info.container_item(arg[1], arg[2])
if item_info then
return active_tab.USE_ITEM(item_info)
end
end