bugfix
This commit is contained in:
@@ -116,26 +116,6 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
SetItemRef = T.vararg-function(arg)
|
||||
if arg[3] ~= 'RightButton' or not index(get_active_tab(), 'CLICK_LINK') or not strfind(arg[1], '^item:%d+') then
|
||||
return orig.SetItemRef(unpack(arg))
|
||||
end
|
||||
local item_info = info.item(tonumber(select(3, strfind(arg[1], '^item:(%d+)'))))
|
||||
if item_info then
|
||||
return get_active_tab().CLICK_LINK(item_info)
|
||||
end
|
||||
end
|
||||
|
||||
UseContainerItem = T.vararg-function(arg)
|
||||
if modified() or not get_active_tab() then
|
||||
return orig.UseContainerItem(unpack(arg))
|
||||
end
|
||||
local item_info = info.container_item(arg[1], arg[2])
|
||||
if item_info and get_active_tab().USE_ITEM then
|
||||
get_active_tab().USE_ITEM(item_info)
|
||||
end
|
||||
end
|
||||
|
||||
M.orig = setmetatable({[_G]=T.acquire()}, {__index=function(self, key) return self[_G][key] end})
|
||||
M.hook = T.vararg-function(arg)
|
||||
local name, object, handler
|
||||
|
||||
+3
-1
@@ -28,7 +28,7 @@ util\scan.lua
|
||||
core\stack.lua
|
||||
core\post.lua
|
||||
core\tooltip.lua
|
||||
core\crafting.lua
|
||||
core\shortcut.lua
|
||||
|
||||
gui\listing.lua
|
||||
gui\auction_listing.lua
|
||||
@@ -49,4 +49,6 @@ tabs\auctions\frame.lua
|
||||
tabs\bids\core.lua
|
||||
tabs\bids\frame.lua
|
||||
|
||||
core\crafting.lua
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
module 'aux.core.shortcut'
|
||||
|
||||
include 'aux'
|
||||
|
||||
local T = require 'T'
|
||||
|
||||
local info = require 'aux.util.info'
|
||||
|
||||
do
|
||||
local orig = UseContainerItem
|
||||
_G.SetItemRef = T.vararg-function(arg)
|
||||
if arg[3] ~= 'RightButton' or not index(get_active_tab(), 'CLICK_LINK') or not strfind(arg[1], '^item:%d+') then
|
||||
return orig.SetItemRef(unpack(arg))
|
||||
end
|
||||
local item_info = info.item(tonumber(select(3, strfind(arg[1], '^item:(%d+)'))))
|
||||
if item_info then
|
||||
return get_active_tab().CLICK_LINK(item_info)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
do
|
||||
local orig = UseContainerItem
|
||||
_G.UseContainerItem = T.vararg-function(arg)
|
||||
if modified() or not get_active_tab() then
|
||||
return orig.UseContainerItem(unpack(arg))
|
||||
end
|
||||
local item_info = info.container_item(arg[1], arg[2])
|
||||
if item_info and get_active_tab().USE_ITEM then
|
||||
get_active_tab().USE_ITEM(item_info)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user