refactoring
This commit is contained in:
+1
-1
@@ -144,7 +144,7 @@ function merchant_buy_scan()
|
||||
end
|
||||
|
||||
function merchant_sell_scan()
|
||||
for slot in info.inventory do temp=slot
|
||||
for slot in info.inventory do auto[slot] = true
|
||||
local item_info = temp-info.container_item(unpack(slot))
|
||||
if item_info then
|
||||
_G.aux_merchant_sell[item_info.item_id] = item_info.tooltip_money / item_info.aux_quantity
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ end
|
||||
|
||||
function private.query.get() return state.params.queries[state.query_index] end
|
||||
|
||||
function wait_for_callback(...) temp=arg
|
||||
function wait_for_callback(...) auto[arg] = true
|
||||
local send_signal, signal_received = signal()
|
||||
local suspended, ret
|
||||
|
||||
|
||||
+4
-4
@@ -9,7 +9,7 @@ function LOAD()
|
||||
local inside_hook = false
|
||||
for name, f in game_tooltip_hooks do
|
||||
local name, f = name, f
|
||||
hook(name, GameTooltip, function(...) temp=arg
|
||||
hook(name, GameTooltip, function(...) auto[arg] = true
|
||||
inside_hook = true
|
||||
game_tooltip_money = 0
|
||||
local ret = temp-A0(orig[GameTooltip][name](unpack(arg)))
|
||||
@@ -19,7 +19,7 @@ function LOAD()
|
||||
end)
|
||||
end
|
||||
local orig = GameTooltip:GetScript('OnTooltipAddMoney')
|
||||
GameTooltip:SetScript('OnTooltipAddMoney', function(...) temp=arg
|
||||
GameTooltip:SetScript('OnTooltipAddMoney', function(...) auto[arg] = true
|
||||
if inside_hook then
|
||||
game_tooltip_money = arg1
|
||||
else
|
||||
@@ -28,7 +28,7 @@ function LOAD()
|
||||
end)
|
||||
end
|
||||
local orig = SetItemRef
|
||||
setglobal('SetItemRef', function(...) temp=arg
|
||||
setglobal('SetItemRef', function(...) auto[arg] = true
|
||||
local result = orig(unpack(arg))
|
||||
local name, _, quality = GetItemInfo(arg[1])
|
||||
if not IsShiftKeyDown() and not IsControlKeyDown() and name then
|
||||
@@ -206,7 +206,7 @@ end
|
||||
function game_tooltip_hooks:SetAuctionSellItem()
|
||||
local name, _, quantity = GetAuctionSellItemInfo()
|
||||
if name then
|
||||
for slot in info.inventory do temp=slot
|
||||
for slot in info.inventory do auto[slot] = true
|
||||
local link = GetContainerItemLink(unpack(slot))
|
||||
if link and select(5, info.parse_link(link)) == name then
|
||||
extend_tooltip(GameTooltip, link, quantity)
|
||||
|
||||
Reference in New Issue
Block a user