This commit is contained in:
Simon Hirsig
2017-11-01 22:10:56 +01:00
parent 2ae5dd1da0
commit 7ec888c2e7
2 changed files with 10 additions and 6 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ do
event_frame:SetScript('OnEvent', function()
if event == 'ADDON_LOADED' then
if arg1 == 'Blizzard_AuctionUI' then
Blizzard_AuctionUI()
auction_ui_loaded()
end
elseif event == 'VARIABLES_LOADED' then
for _, f in pairs(handlers) do f() end
@@ -219,7 +219,7 @@ do
end
end
function Blizzard_AuctionUI()
function auction_ui_loaded()
AuctionFrame:UnregisterEvent('AUCTION_HOUSE_SHOW')
AuctionFrame:SetScript('OnHide', nil)
hook('ShowUIPanel', T.vararg-function(arg)
+8 -4
View File
@@ -11,14 +11,18 @@ local search_tab = require 'aux.tabs.search'
function handle.LOAD()
event_listener('ADDON_LOADED', function()
(_M[arg1] or nop)()
if arg1 == 'Blizzard_CraftUI' then
craft_ui_loaded()
elseif arg1 == 'Blizzard_TradeSkillUI' then
trade_skill_ui_loaded()
end
end)
end
do
local function cost_label(cost)
local label = LIGHTYELLOW_FONT_COLOR_CODE .. '(Total Cost: ' .. FONT_COLOR_CODE_CLOSE
label = label .. (cost and money.to_string2(cost, nil, LIGHTYELLOW_FONT_COLOR_CODE) or GRAY_FONT_COLOR_CODE .. '---' .. FONT_COLOR_CODE_CLOSE)
label = label .. (cost and money.to_string2(cost, nil, LIGHTYELLOW_FONT_COLOR_CODE) or GRAY_FONT_COLOR_CODE .. '?' .. FONT_COLOR_CODE_CLOSE)
label = label .. LIGHTYELLOW_FONT_COLOR_CODE .. ')' .. FONT_COLOR_CODE_CLOSE
return label
end
@@ -33,7 +37,7 @@ do
end
end)
end
function Blizzard_CraftUI()
function craft_ui_loaded()
hook('CraftFrame_SetSelection', T.vararg-function(arg)
local ret = T.temp-T.list(orig.CraftFrame_SetSelection(unpack(arg)))
local id = GetCraftSelectionIndex()
@@ -62,7 +66,7 @@ do
hook_quest_item(_G['CraftReagent' .. i])
end
end
function Blizzard_TradeSkillUI()
function trade_skill_ui_loaded()
hook('TradeSkillFrame_SetSelection', T.vararg-function(arg)
local ret = T.temp-T.list(orig.TradeSkillFrame_SetSelection(unpack(arg)))
local id = GetTradeSkillSelectionIndex()