-
Notifications
You must be signed in to change notification settings - Fork 0
/
SoloSelfFound.lua
42 lines (34 loc) · 1 KB
/
SoloSelfFound.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
local feature = ns.Register({
identifier = "SoloSelfFound",
description = "Solo Self-Found - Disables auction house, mail and trade.",
category = "automation",
config = {},
data = {}
})
local frame = CreateFrame("Frame")
frame:RegisterEvent("AUCTION_HOUSE_SHOW")
frame:RegisterEvent("MAIL_SHOW")
frame:RegisterEvent("TRADE_REQUEST")
frame:RegisterEvent("TRADE_SHOW")
frame:RegisterEvent("PARTY_INVITE_REQUEST")
frame:SetScript("OnEvent", function()
if not ns.IsEnabled(feature.identifier) then return end
if event == "AUCTION_HOUSE_SHOW" then
CloseAuctionHouse()
CloseAllBags()
end
if event == "MAIL_SHOW" then
CloseMail()
CloseAllBags()
end
if event == "TRADE_SHOW" or event == "TRADE_REQUEST" then
CloseTrade()
CloseAllBags()
SendChatMessage("Sorry, I'm doing Solo Self-Found.", "SAY")
end
if event == "PARTY_INVITE_REQUEST" then
DeclineGroup()
StaticPopup_Hide("PARTY_INVITE")
SendChatMessage("Sorry, I'm doing Solo Self-Found.", "SAY")
end
end)