-
Notifications
You must be signed in to change notification settings - Fork 1
/
AuctionatorConflicts.lua
88 lines (60 loc) · 2.11 KB
/
AuctionatorConflicts.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
local addonName, addonTable = AuctionatorName, AuctionatorAddon;
local zc = addonTable.zc;
local Atr_orig_RecipeKnown_EventScan;
local Atr_orig_LootLink_OnEvent;
local Atr_orig_WOWEcon_Scan_AH;
-----------------------------------------
local function Atr_RecipeKnown_EventScan (self, event, ...)
if (event == "AUCTION_ITEM_LIST_UPDATE") then
if (Atr_IsTabSelected()) then
return;
end
local numBatchAuctions = Atr_GetNumAuctionItems("list");
if (numBatchAuctions > 50) then -- full scan
return;
end
end
Atr_orig_RecipeKnown_EventScan (self, event, ...);
end
-----------------------------------------
local function Atr_LootLink_OnEvent (self, event, ...)
if (event == "AUCTION_ITEM_LIST_UPDATE") then
if (Atr_IsTabSelected()) then
return;
end
local numBatchAuctions = Atr_GetNumAuctionItems("list");
if (numBatchAuctions > 50) then -- full scan
return;
end
end
Atr_orig_LootLink_OnEvent (self, event, ...);
end
-----------------------------------------
local function Atr_WOWEcon_Scan_AH (self, event, ...)
if (Atr_IsTabSelected()) then
return;
end
local numBatchAuctions = Atr_GetNumAuctionItems("list");
if (numBatchAuctions > 50) then -- full scan
return;
end
Atr_orig_WOWEcon_Scan_AH (self, event, ...);
end
-----------------------------------------
function Atr_Check_For_Conflicts (addonName)
if (zc.StringSame (addonName, "recipeknown") and RecipeKnown_EventScan) then
Atr_orig_RecipeKnown_EventScan = RecipeKnown_EventScan;
RecipeKnown_EventScan = Atr_RecipeKnown_EventScan
zc.msg_yellow ("Auctionator is patching RecipeKnown to prevent a known conflict.");
end
if (zc.StringContains (addonName, "lootlink") and LootLink_OnEvent) then
Atr_orig_LootLink_OnEvent = LootLink_OnEvent;
LootLink_OnEvent = Atr_LootLink_OnEvent
zc.msg_yellow ("Auctionator is patching LootLink to prevent a known conflict.");
end
if (zc.StringContains (addonName, "wowecon") and WOWEcon_Scan_AH) then
Atr_orig_WOWEcon_Scan_AH = WOWEcon_Scan_AH;
WOWEcon_Scan_AH = Atr_WOWEcon_Scan_AH
zc.msg_yellow ("Auctionator is patching WowEcon to prevent a known conflict.");
end
end