Browse Source

bugfix: hasCD is nil if no cd, not 0

pull/1/head
xanthics 3 years ago
parent
commit
63a0525cd3
  1. 4
      TradeSkillMaster_Crafting/Modules/Util.lua

4
TradeSkillMaster_Crafting/Modules/Util.lua

@ -102,7 +102,7 @@ function Util:ScanCurrentProfession()
if itemID and spellID then if itemID and spellID then
local lNum, hNum = GetTradeSkillNumMade(index) local lNum, hNum = GetTradeSkillNumMade(index)
local numMade = floor(((lNum or 1) + (hNum or 1))/2) 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 = {} local mats = {}
if currentTradeSkill == TSM.enchantingName and strfind(itemLink, "enchant:") then if currentTradeSkill == TSM.enchantingName and strfind(itemLink, "enchant:") then
local VellumString = "item:"..TSM.VellumInfo[spellID]..":0:0:0:0:0:0" 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 if itemID and spellID then
local lNum, hNum = GetTradeSkillNumMade(index) local lNum, hNum = GetTradeSkillNumMade(index)
local numMade = floor(((lNum or 1) + (hNum or 1))/2) 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 = {} local mats = {}
if currentTradeSkill == TSM.enchantingName and strfind(itemLink, "enchant:") then if currentTradeSkill == TSM.enchantingName and strfind(itemLink, "enchant:") then
local VellumString = "item:"..TSM.VellumInfo[spellID]..":0:0:0:0:0:0" local VellumString = "item:"..TSM.VellumInfo[spellID]..":0:0:0:0:0:0"

Loading…
Cancel
Save