From 63a0525cd35002b4c5f8ed6171e5eab915beb5d8 Mon Sep 17 00:00:00 2001 From: xanthics <119889093+Xan-Asc@users.noreply.github.com> Date: Thu, 6 Apr 2023 20:35:22 -0700 Subject: [PATCH] bugfix: hasCD is nil if no cd, not 0 --- TradeSkillMaster_Crafting/Modules/Util.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TradeSkillMaster_Crafting/Modules/Util.lua b/TradeSkillMaster_Crafting/Modules/Util.lua index 537ffad..9fe2fb3 100644 --- a/TradeSkillMaster_Crafting/Modules/Util.lua +++ b/TradeSkillMaster_Crafting/Modules/Util.lua @@ -102,7 +102,7 @@ function Util:ScanCurrentProfession() if itemID and spellID then local lNum, hNum = GetTradeSkillNumMade(index) local numMade = floor(((lNum or 1) + (hNum or 1))/2) - local hasCD = GetSpellBaseCooldown(spellID) + local hasCD = GetSpellBaseCooldown(spellID) > 0 and 1 or nil local mats = {} if currentTradeSkill == TSM.enchantingName and strfind(itemLink, "enchant:") then local VellumString = "item:"..TSM.VellumInfo[spellID]..":0:0:0:0:0:0" @@ -227,7 +227,7 @@ function Util.ScanSyncedProfessionThread(self) if itemID and spellID then local lNum, hNum = GetTradeSkillNumMade(index) local numMade = floor(((lNum or 1) + (hNum or 1))/2) - local hasCD = GetSpellBaseCooldown(spellID) + local hasCD = GetSpellBaseCooldown(spellID) > 0 and 1 or nil local mats = {} if currentTradeSkill == TSM.enchantingName and strfind(itemLink, "enchant:") then local VellumString = "item:"..TSM.VellumInfo[spellID]..":0:0:0:0:0:0"