From c2b80f32bbf498b9dbf84afd03e9be2d9130817f Mon Sep 17 00:00:00 2001 From: Brad Morgan Date: Sat, 30 Nov 2024 09:39:46 -0700 Subject: [PATCH] Add another check for in combat --- Skillet.lua | 6 ++++++ SkilletNewsData.lua | 1 + 2 files changed, 7 insertions(+) diff --git a/Skillet.lua b/Skillet.lua index ff1b64d..901de7e 100644 --- a/Skillet.lua +++ b/Skillet.lua @@ -900,6 +900,7 @@ end function Skillet:PLAYER_REGEN_DISABLED() DA.TRACE("PLAYER_REGEN_DISABLED()") + self.inCombat = true if self:HideAllWindows() then DA.MARK3("|cf0f00000Skillet-Classic|r: Combat lockdown restriction. Leave combat and try again.") end @@ -907,6 +908,7 @@ end function Skillet:PLAYER_REGEN_ENABLED() DA.TRACE("PLAYER_REGEN_ENABLED()") + self.inCombat = false end function Skillet:PLAYER_LOGOUT() @@ -1316,6 +1318,10 @@ end -- function Skillet:SkilletShowWindow() DA.DEBUG(0,"SkilletShowWindow(), currentTrade= "..tostring(self.currentTrade)..", scanInProgress= "..tostring(scanInProgress)) + if UnitAffectingCombat("player") then + DA.MARK3(0,"|cff8888ffSkillet|r: Combat lockdown restriction.".." Leave combat and try again.") + return + end if self:IsModKey2Down() then self.db.realm.skillDB[self.currentPlayer][self.currentTrade] = {} end diff --git a/SkilletNewsData.lua b/SkilletNewsData.lua index 476a561..f2c3abf 100644 --- a/SkilletNewsData.lua +++ b/SkilletNewsData.lua @@ -31,6 +31,7 @@ Skillet.NewsData = { { name = "Fixes", data = { { header = "Plugins", body = "Fix Auctionator sorting errors" }, + { header = "Combat", body = "Add another check for in combat" }, }, }, { name = "Changes",