Correctly detect smelting recipes (#3)

* Bugfix: Smelting was not being properly detected

* Bugfix: missed a variable cleanup
This commit is contained in:
Xan-Asc
2023-05-03 13:14:54 -07:00
committed by GitHub
parent aa1617f4db
commit bd20d5d614
@@ -275,6 +275,7 @@ function GUI:EventHandler(event, ...)
--GUI:UpdateQueue()
end
end
-- no longer casting a spell so discard spellID
TSM.currentspell = nil
-- TSMAPI:CreateTimeDelay("craftingQueueUpdateThrottle", 0.2, GUI.UpdateQueue)
elseif event == "UNIT_SPELLCAST_INTERRUPTED" or event == "UNIT_SPELLCAST_FAILED" or event == "UNIT_SPELLCAST_FAILED_QUIET" then
@@ -289,6 +290,8 @@ function GUI:EventHandler(event, ...)
GUI.isCrafting.quantity = 0
TSMAPI:CreateTimeDelay("craftingQueueUpdateThrottle", 0.2, GUI.UpdateQueue)
end
-- no longer casting a spell so discard spellID
TSM.currentspell = nil
end
end
end
@@ -317,6 +320,7 @@ function GUI:UpdateTradeSkills()
skillName = GetSkillLineInfo(i)
if skillName == "Professions" then --TRADE_SKILLS ) then
tradeSkill1, header = GetSkillLineInfo(i + 1);
if tradeSkill1 == "Mining" then tradeSkill1 = "Smelting" end
if header or not GetSpellInfo(tradeSkill1) then
tradeSkill1 = nil
else
@@ -324,6 +328,7 @@ function GUI:UpdateTradeSkills()
end
tradeSkill2, header = GetSkillLineInfo(i + 2);
if tradeSkill2 == "Mining" then tradeSkill2 = "Smelting" end
if header or not GetSpellInfo(tradeSkill2) then
tradeSkill2 = nil
else