From 5e3a67645758b2f07f65801fff47c49cd7e9c18d Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Sat, 20 Feb 2016 11:49:06 +0100 Subject: [PATCH] small refactoring --- core.lua | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/core.lua b/core.lua index bbe6b6c..1dcf262 100644 --- a/core.lua +++ b/core.lua @@ -279,23 +279,21 @@ end function Aux.UseContainerItem(bag, slot) - if arg1 == 'RightButton' then - if AuxSearchFrame:IsVisible() then - local item_info = Aux.info.container_item(bag, slot) - item_info = item_info and Aux.static.item_info(item_info.item_id) - if item_info then - Aux.search_frame.start_search(strlower(item_info.name)..'/exact') - end - return + if AuxSearchFrame:IsVisible() then + local item_info = Aux.info.container_item(bag, slot) + item_info = item_info and Aux.static.item_info(item_info.item_id) + if item_info then + Aux.search_frame.start_search(strlower(item_info.name)..'/exact') end + return + end - if AuxPostFrame:IsVisible() then - local item_info = Aux.info.container_item(bag, slot) - if item_info then - Aux.post_frame.select_item(item_info.item_key) - end - return + if AuxPostFrame:IsVisible() then + local item_info = Aux.info.container_item(bag, slot) + if item_info then + Aux.post_frame.select_item(item_info.item_key) end + return end return Aux.orig.UseContainerItem(bag, slot)