refactoring
This commit is contained in:
+9
-9
@@ -22,7 +22,7 @@ aux 'core'
|
||||
|
||||
public.version = '5.0.0'
|
||||
|
||||
function public.print(...) temp=arg
|
||||
function public.print(...) auto[arg] = true
|
||||
DEFAULT_CHAT_FRAME:AddMessage(LIGHTYELLOW_FONT_COLOR_CODE .. '[aux] ' .. join(map(arg, tostring), ' '))
|
||||
end
|
||||
|
||||
@@ -81,7 +81,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
function SetItemRef(...) temp=arg
|
||||
function SetItemRef(...) auto[arg] = true
|
||||
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
|
||||
@@ -90,7 +90,7 @@ function SetItemRef(...) temp=arg
|
||||
end
|
||||
end
|
||||
|
||||
function UseContainerItem(...) temp=arg
|
||||
function UseContainerItem(...) auto[arg] = true
|
||||
if modified or not index(active_tab, 'USE_ITEM') then
|
||||
return orig.UseContainerItem(unpack(arg))
|
||||
end
|
||||
@@ -100,7 +100,7 @@ function UseContainerItem(...) temp=arg
|
||||
end
|
||||
|
||||
public.orig = setmetatable({[_G]=t}, {__index=function(self, key) return self[_G][key] end})
|
||||
function public.hook(...) temp=arg
|
||||
function public.hook(...) auto[arg] = true
|
||||
local name, object, handler
|
||||
if arg.n == 3 then
|
||||
name, object, handler = unpack(arg)
|
||||
@@ -186,7 +186,7 @@ end
|
||||
|
||||
do
|
||||
local last_owner_page_requested
|
||||
function GetOwnerAuctionItems(...) temp=arg
|
||||
function GetOwnerAuctionItems(...) auto[arg] = true
|
||||
local page = arg[1]
|
||||
last_owner_page_requested = page
|
||||
return orig.GetOwnerAuctionItems(unpack(arg))
|
||||
@@ -199,7 +199,7 @@ end
|
||||
function ADDON_LOADED.Blizzard_AuctionUI()
|
||||
AuctionFrame:UnregisterEvent('AUCTION_HOUSE_SHOW')
|
||||
AuctionFrame:SetScript('OnHide', nil)
|
||||
hook('ShowUIPanel', function(...) temp=arg
|
||||
hook('ShowUIPanel', function(...) auto[arg] = true
|
||||
if arg[1] == AuctionFrame then return AuctionFrame:Show() end
|
||||
return orig.ShowUIPanel(unpack(arg))
|
||||
end)
|
||||
@@ -214,7 +214,7 @@ do
|
||||
return label
|
||||
end
|
||||
function ADDON_LOADED.Blizzard_CraftUI()
|
||||
hook('CraftFrame_SetSelection', function(...) temp=arg
|
||||
hook('CraftFrame_SetSelection', function(...) auto[arg] = true
|
||||
local ret = temp-A(orig.CraftFrame_SetSelection(unpack(arg)))
|
||||
local id = GetCraftSelectionIndex()
|
||||
local reagent_count = GetCraftNumReagents(id)
|
||||
@@ -241,7 +241,7 @@ do
|
||||
end)
|
||||
end
|
||||
function ADDON_LOADED.Blizzard_TradeSkillUI()
|
||||
hook('TradeSkillFrame_SetSelection', function(...) temp=arg
|
||||
hook('TradeSkillFrame_SetSelection', function(...) auto[arg] = true
|
||||
local ret = temp-A(orig.TradeSkillFrame_SetSelection(unpack(arg)))
|
||||
local id = GetTradeSkillSelectionIndex()
|
||||
local reagent_count = GetTradeSkillNumReagents(id)
|
||||
@@ -269,7 +269,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
function AuctionFrameAuctions_OnEvent(...) temp=arg
|
||||
function AuctionFrameAuctions_OnEvent(...) auto[arg] = true
|
||||
if AuctionFrameAuctions:IsVisible() then
|
||||
return orig.AuctionFrameAuctions_OnEvent(unpack(arg))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user