send scan data through gchat
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
Modified version of aux that shares scan data with your guild.
|
||||
This is experimental and I am unsure how well it will work, might run into issues when scanning lots of pages.
|
||||
|
||||
# aux - WoW 1.12 AddOn
|
||||
|
||||
The most advanced auction house addOn for the 1.12 client with some features more advanced than anything even on retail.
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
libs\package.lua
|
||||
libs\T.lua
|
||||
libs\AceComm-2.0\AceComm-2.0.lua
|
||||
libs\AceAddon-2.0\AceAddon-2.0.lua
|
||||
|
||||
aux-addon.lua
|
||||
util.lua
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
module 'aux.core.scan'
|
||||
|
||||
AuxAddon = AceLibrary("AceAddon-2.0"):new("AceComm-2.0") --im unsure this is done correctly but seems to work lol
|
||||
|
||||
local commPrefix = "AuxAddon";
|
||||
AuxAddon:SetCommPrefix(commPrefix)
|
||||
|
||||
local T = require 'T'
|
||||
local aux = require 'aux'
|
||||
local info = require 'aux.util.info'
|
||||
local history = require 'aux.core.history'
|
||||
|
||||
|
||||
local PAGE_SIZE = 50
|
||||
|
||||
function aux.handle.CLOSE()
|
||||
abort()
|
||||
end
|
||||
|
||||
function AuxAddon:OnEnable()
|
||||
--self:RegisterComm(commPrefix, "GROUP", "OnCommReceive") for testing purposes, not really useful in real world I think
|
||||
self:RegisterComm(commPrefix, "GUILD", "OnCommReceive");
|
||||
end
|
||||
|
||||
do
|
||||
local scan_states = {}
|
||||
|
||||
@@ -146,6 +157,8 @@ function scan_page(i)
|
||||
auction_info.query_type = get_state().params.type
|
||||
|
||||
history.process_auction(auction_info)
|
||||
--AuxAddon:SendCommMessage("GROUP", auction_info); for testing purposes, not really useful in real world I think
|
||||
AuxAddon:SendCommMessage("GUILD", auction_info);
|
||||
|
||||
if (get_state().params.auto_buy_validator or pass)(auction_info) and auction_info.buyout_price >0 and auction_info.owner ~= UnitName("player") then
|
||||
local send_signal, signal_received = aux.signal()
|
||||
@@ -163,6 +176,11 @@ function scan_page(i)
|
||||
return scan_page(i + 1)
|
||||
end
|
||||
|
||||
function AuxAddon:OnCommReceive(prefix, sender, distribution, auction_info)
|
||||
history.process_auction(auction_info)
|
||||
end
|
||||
|
||||
|
||||
function wait_for_results()
|
||||
if get_state().params.type == 'bidder' then
|
||||
return aux.when(function() return aux.bids_loaded() end, accept_results)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user