Skip to content

Commit

Permalink
Adjust TradeSkillMaster compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
b-morgan committed Oct 6, 2022
1 parent a3f3f11 commit 30221a4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
8 changes: 8 additions & 0 deletions DebugAids.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
28 changes: 14 additions & 14 deletions Skillet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion SkilletData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 30221a4

Please sign in to comment.