Mercurial > wow > askmrrobot
changeset 179:eec8032ba9df v84
addon should close automatically when entering combat now
author | yellowfive |
---|---|
date | Thu, 13 Feb 2020 13:21:44 -0800 |
parents | 725fc231cde9 |
children | 82598dc4fe2e |
files | AskMrRobot-Serializer/AskMrRobot-Serializer.lua AskMrRobot.toc Core.lua Junk.lua Shopping.lua ui/Ui.lua |
diffstat | 6 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/AskMrRobot-Serializer/AskMrRobot-Serializer.lua Sun Jan 26 12:37:26 2020 -0800 +++ b/AskMrRobot-Serializer/AskMrRobot-Serializer.lua Thu Feb 13 13:21:44 2020 -0800 @@ -1,6 +1,6 @@ -- AskMrRobot-Serializer will serialize and communicate character data between users. -local MAJOR, MINOR = "AskMrRobot-Serializer", 83 +local MAJOR, MINOR = "AskMrRobot-Serializer", 84 local Amr, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not Amr then return end -- already loaded by something else
--- a/AskMrRobot.toc Sun Jan 26 12:37:26 2020 -0800 +++ b/AskMrRobot.toc Thu Feb 13 13:21:44 2020 -0800 @@ -1,7 +1,7 @@ ## Interface: 80300 ## Title: Ask Mr. Robot ## Author: Team Robot, Inc. -## Version: 83 +## Version: 84 ## Notes: Gear import/export, combat logging, and more. ## URL: www.askmrrobot.com ## SavedVariables: AskMrRobotDb4
--- a/Core.lua Sun Jan 26 12:37:26 2020 -0800 +++ b/Core.lua Thu Feb 13 13:21:44 2020 -0800 @@ -240,6 +240,12 @@ -- disabling is not supported end +local function onEnterCombat() + Amr:Hide() + Amr:HideShopWindow() + Amr:HideJunkWindow() +end + ---------------------------------------------------------------------------------------- -- Slash Commands @@ -682,6 +688,7 @@ Amr:AddEventHandler("PLAYER_ENTERING_WORLD", onPlayerEnteringWorld) +Amr:AddEventHandler("PLAYER_REGEN_DISABLED", onEnterCombat) ---------------------------------------------------------------------------------------- -- Debugging
--- a/Junk.lua Sun Jan 26 12:37:26 2020 -0800 +++ b/Junk.lua Thu Feb 13 13:21:44 2020 -0800 @@ -288,6 +288,8 @@ function Amr:ShowJunkWindow() + if InCombatLockdown() then return end + if not _frameJunk then _frameJunk = AceGUI:Create("AmrUiFrame") _frameJunk:SetStatusTable(Amr.db.profile.junkWindow) -- window position is remembered in db
--- a/Shopping.lua Sun Jan 26 12:37:26 2020 -0800 +++ b/Shopping.lua Thu Feb 13 13:21:44 2020 -0800 @@ -60,6 +60,8 @@ function Amr:ShowShopWindow() + if InCombatLockdown() then return end + if not _frameShop then _frameShop = AceGUI:Create("AmrUiFrame") _frameShop:SetStatusTable(Amr.db.profile.shopWindow) -- window position is remembered in db
--- a/ui/Ui.lua Sun Jan 26 12:37:26 2020 -0800 +++ b/ui/Ui.lua Thu Feb 13 13:21:44 2020 -0800 @@ -351,6 +351,8 @@ function Amr:Show() if not self:IsEnabled() then return end + if InCombatLockdown() then return end + if _mainFrame then _mainFrame:Show() else @@ -367,6 +369,7 @@ Amr:Hide() --Amr:HideLootWindow() Amr:HideShopWindow() + Amr:HideJunkWindow() Amr.db.profile.options.uiScale = 1 Amr.db.profile.window = {} Amr.db.profile.lootWindow = {}