diff --git a/Adherent-BCC.toc b/Adherent-BCC.toc index 73ec14c..205e9a6 100644 --- a/Adherent-BCC.toc +++ b/Adherent-BCC.toc @@ -2,7 +2,7 @@ ## Author: Roadblock ## Title: Adherent ## Notes: Adherent lets you define rules for auto accepting follow, group join and group invite requests. -## Version: 1.1.1 +## Version: 1.1.2 ## X-Alpha: ## X-Website: https://github.com/Road-block/Adherent/releases/latest ## OptionalDeps: Ace3 diff --git a/Adherent.toc b/Adherent.toc index 73ec14c..205e9a6 100644 --- a/Adherent.toc +++ b/Adherent.toc @@ -2,7 +2,7 @@ ## Author: Roadblock ## Title: Adherent ## Notes: Adherent lets you define rules for auto accepting follow, group join and group invite requests. -## Version: 1.1.1 +## Version: 1.1.2 ## X-Alpha: ## X-Website: https://github.com/Road-block/Adherent/releases/latest ## OptionalDeps: Ace3 diff --git a/Locales/enUS.lua b/Locales/enUS.lua index e27ff19..f17bab3 100644 --- a/Locales/enUS.lua +++ b/Locales/enUS.lua @@ -14,11 +14,11 @@ if not L then return end L["Hide from Minimap"] = true L["Hide addon Minimap Button."] = true L["Not when busy"] = true - L["%s will not interrupt Trade/Mail/Auction/Bank/Professions"] = true + L["%s will not interrupt Trade/Mail/Auction/Bank/Professions/Queues"] = true L["Not in Combat"] = true L["%s will not automate when you are in Combat"] = true L["Not in Instances"] = true - L["%s will not automate when you are in an Instance"] = true + L["%s will not automate when you are in a PvE Instance"] = true L["Can't comply due to \'%s\' option"] = true L["Echo %s actions"] = true L["Print %s actions to your chatframe"] = true @@ -63,10 +63,10 @@ if not L then return end L["Remove keywords from Custom Keywords"] = true L["Keywords monitored by %s"] = true L["Who can command %s?"] = true - L["%s will listen to.."] = true + L["%s will listen to"] = true L["Only Custom"] = true L["Only react to |cffffff00custom|r keywords (ignore |cffdcdcdcdefaults|r)"] = true - L["Auto accept Group Invites from.."] = true + L["Auto accept Group Invites from"] = true L["Player Tooltip Hint"] = true L["Indicate known %s in player tooltips with an icon after their Name|T%s:15|t"] = true L["Inform Initiator"] = true diff --git a/core.lua b/core.lua index 6cfd591..9fd0b9d 100644 --- a/core.lua +++ b/core.lua @@ -185,7 +185,7 @@ function adherent:options() }, where = { type = "group", - name = format(L["%s will listen to.."],addonName), + name = format(L["%s will listen to"],addonName), inline = true, order = 2, args = { }, @@ -207,7 +207,7 @@ function adherent:options() args = { who = { type = "group", - name = L["Auto accept Group Invites from.."], + name = L["Auto accept Group Invites from"], inline = true, order = 1, args = { }, @@ -229,7 +229,7 @@ function adherent:options() }, where = { type = "group", - name = format(L["%s will listen to.."],addonName), + name = format(L["%s will listen to"],addonName), inline = true, order = 2, args = { }, @@ -294,7 +294,7 @@ function adherent:options() self._options.args.general.args.settings.args["notinstance"] = { type = "toggle", name = L["Not in Instances"], - desc = format(L["%s will not automate when you are in an Instance"], addonName), + desc = format(L["%s will not automate when you are in a PvE Instance"], addonName), order = 12, get = function() return adherent.db.char.notinstance end, set = function(info, val) @@ -304,7 +304,7 @@ function adherent:options() self._options.args.general.args.settings.args["notbusy"] = { type = "toggle", name = L["Not when busy"], - desc = format(L["%s will not interrupt Trade/Mail/Auction/Bank/Professions"], addonName), + desc = format(L["%s will not interrupt Trade/Mail/Auction/Bank/Professions/Queues"], addonName), order = 13, get = function() return adherent.db.char.notbusy end, set = function(info, val) @@ -1176,11 +1176,16 @@ function adherent:deferredInit(guildname) end function adherent:showOptions() + --[[InterfaceOptionsFrame_OpenToCategory(adherent.blizzoptions) + self:ScheduleTimer("ScrollToCategory",1,addonName,1) + self:ScheduleTimer(function() InterfaceOptionsFrame_OpenToCategory(adherent.blizzoptions) - self:ScheduleTimer("ScrollToCategory",1,addonName,1) - self:ScheduleTimer(function() - InterfaceOptionsFrame_OpenToCategory(adherent.blizzoptions) - end,1) + end,1)]] + if ACD.OpenFrames[addonName] then + ACD:Close(addonName) + else + ACD:Open(addonName,"general") + end end function adherent:debugPrint(msg,onlyWhenDebug) @@ -1531,13 +1536,27 @@ function adherent:group(unit) end end +local bg_queued = function() + for i=1, MAX_BATTLEFIELD_QUEUES do + local status = GetBattlefieldStatus(i) + if status and (status == "queued" or status == "confirm") then + return true + end + end + return false +end function adherent:busy() local _, _, _, _, _, tradeskillChannel = UnitChannelInfo("player") local _, _, _, _, _, tradeskillCast = UnitCastingInfo("player") local crafting = (_G.TradeSkillFrame and _G.TradeSkillFrame:IsVisible()) or (_G.CraftFrame and _G.CraftFrame:IsVisible()) + local professions = crafting or tradeskillChannel or tradeskillCast local interacting = UnitName("npc") + local lfgqueue = _G.C_LFGList and _G.C_LFGList.HasActiveEntryInfo() + local bgqueue = bg_queued() + local in_queue = lfgqueue or bgqueue + local wouldleave = _G.WillAcceptInviteRemoveQueues() local dnd = UnitIsDND("player") - if interacting or crafting or tradeskillChannel or tradeskillCast or dnd then + if interacting or professions or in_queue or wouldleave or dnd then return true end return false