From 9feed312e5ca943f93036ca374736144bb3a2c57 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Mon, 8 Aug 2016 00:47:45 +0200 Subject: [PATCH] bugfix --- core.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core.lua b/core.lua index 8af598e..c8ffa92 100644 --- a/core.lua +++ b/core.lua @@ -427,7 +427,7 @@ function public.price_level_color(pct) end function private.SetItemRef(...) - if not arg[3] == 'RightButton' or not m.active_tab.CLICK_LINK or not strfind(arg[1], '^item:%d+') then + if not arg[3] == 'RightButton' or not m.active_tab.CLICK_LINK or not m.active_tab() or not strfind(arg[1], '^item:%d+') then return m.orig.SetItemRef(unpack(arg)) end local item_info = m.info.item(tonumber(({strfind(arg[1], '^item:(%d+)')})[3])) @@ -437,7 +437,7 @@ function private.SetItemRef(...) end function private.PickupContainerItem(...) - if IsShiftKeyDown() or IsControlKeyDown() or IsAltKeyDown() or not m.active_tab.PICKUP_ITEM then + if IsShiftKeyDown() or IsControlKeyDown() or IsAltKeyDown() or not m.active_tab() or not m.active_tab.PICKUP_ITEM then return m.orig.PickupContainerItem(unpack(arg)) end local item_info = m.info.container_item(arg[1], arg[2]) @@ -447,7 +447,7 @@ function private.PickupContainerItem(...) end function private.UseContainerItem(...) - if IsShiftKeyDown() or IsControlKeyDown() or IsAltKeyDown() or not m.active_tab.USE_ITEM then + if IsShiftKeyDown() or IsControlKeyDown() or IsAltKeyDown() or not m.active_tab() or not m.active_tab.USE_ITEM then return m.orig.UseContainerItem(unpack(arg)) end local item_info = m.info.container_item(arg[1], arg[2])