From 30221a4f3bd54e1f8d81c6fba2d551b87f0acf42 Mon Sep 17 00:00:00 2001 From: Brad Morgan Date: Thu, 6 Oct 2022 10:44:58 -0600 Subject: [PATCH] Adjust TradeSkillMaster compatibility --- DebugAids.lua | 8 ++++++++ Skillet.lua | 28 ++++++++++++++-------------- SkilletData.lua | 2 +- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/DebugAids.lua b/DebugAids.lua index d9b2b0d..c1f517f 100644 --- a/DebugAids.lua +++ b/DebugAids.lua @@ -85,6 +85,14 @@ function DA.MARK2(text) DA.MARK(text) end +-- +-- CHAT and MARK the text +-- +function DA.MARK3(text) + DA.CHAT(text) + DA.MARK(text) +end + function DA.WARN(...) if not DA.WarnLog and not DA.DebugLogging then return "" end local text = "" diff --git a/Skillet.lua b/Skillet.lua index 05fb67e..1f73830 100644 --- a/Skillet.lua +++ b/Skillet.lua @@ -1156,36 +1156,36 @@ function Skillet:SkilletShow() else name, rank, maxRank = GetTradeSkillLine() end - DA.DEBUG(0,"name= '"..tostring(name).."', rank= "..tostring(rank)..", maxRank= "..tostring(maxRank)) + --DA.DEBUG(0,"name= '"..tostring(name).."', rank= "..tostring(rank)..", maxRank= "..tostring(maxRank)) if name then self.currentTrade = self.tradeSkillIDsByName[name] end if self:IsSupportedTradeskill(self.currentTrade) and not self.linkedSkill then DA.DEBUG(0,"SkilletShow: "..self.currentTrade..", name= '"..tostring(name).."', rank= "..tostring(rank)..", maxRank= "..tostring(maxRank)) self.selectedSkill = nil self.dataScanned = false self.tradeSkillOpen = true - if self.isCraft then - if Skillet.db.profile.hide_blizzard_frame then + if self.db.profile.hide_blizzard_frame and not TSM_API then + if self.isCraft then DA.DEBUG(0,"HideUIPanel(CraftFrame)") Skillet.hideCraftFrame = true HideUIPanel(CraftFrame) if Skillet.tradeShow then CloseTradeSkill() end - end - elseif Skillet.db.profile.hide_blizzard_frame then - DA.DEBUG(0,"HideUIPanel(TradeSkillFrame)") - Skillet.hideTradeSkillFrame = true - HideUIPanel(TradeSkillFrame) - if Skillet.craftShow then - self:RestoreEnchantButton() - CloseCraft() + else + DA.DEBUG(0,"HideUIPanel(TradeSkillFrame)") + Skillet.hideTradeSkillFrame = true + HideUIPanel(TradeSkillFrame) + if Skillet.craftShow then + self:RestoreEnchantButton() + CloseCraft() + end end end -- -- Processing will continue in SkilletShowWindow when the TRADE_SKILL_UPDATE or CRAFT_UPDATE event fires -- (Wrath needs a little help) -- - if self.build == "Wrath" then + if isWrath then if self.isCraft then Skillet:CRAFT_UPDATE() else @@ -1224,11 +1224,11 @@ function Skillet:SkilletShowWindow() if not self:RescanTrade() then if TSM_API or ZygorGuidesViewerClassicSettings then if TSM_API then - DA.CHAT(L["Conflict with the addon TradeSkillMaster"]) + DA.MARK3(L["Conflict with the addon TradeSkillMaster"]) self.db.profile.TSM_API = true end if ZygorGuidesViewerClassicSettings then - DA.CHAT(L["Conflict with the addon Zygor Guides"]) + DA.MARK3(L["Conflict with the addon Zygor Guides"]) self.db.profile.ZYGOR = true end else diff --git a/SkilletData.lua b/SkilletData.lua index 458feb2..c3609aa 100644 --- a/SkilletData.lua +++ b/SkilletData.lua @@ -117,7 +117,7 @@ function Skillet:CollectTradeSkillData() self.tradeSkillNamesByID[id] = name end end - if not TSM_API and self.db.profile.support_crafting then + if isWrath or (self.db.profile.support_crafting and not TSM_API) then for i=1,#CraftList,1 do local id = CraftList[i] local name = GetSpellInfo(id)