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() --GUI:UpdateQueue()
end end
end end
-- no longer casting a spell so discard spellID
TSM.currentspell = nil TSM.currentspell = nil
-- TSMAPI:CreateTimeDelay("craftingQueueUpdateThrottle", 0.2, GUI.UpdateQueue) -- TSMAPI:CreateTimeDelay("craftingQueueUpdateThrottle", 0.2, GUI.UpdateQueue)
elseif event == "UNIT_SPELLCAST_INTERRUPTED" or event == "UNIT_SPELLCAST_FAILED" or event == "UNIT_SPELLCAST_FAILED_QUIET" then elseif event == "UNIT_SPELLCAST_INTERRUPTED" or event == "UNIT_SPELLCAST_FAILED" or event == "UNIT_SPELLCAST_FAILED_QUIET" then
@@ -289,7 +290,9 @@ function GUI:EventHandler(event, ...)
GUI.isCrafting.quantity = 0 GUI.isCrafting.quantity = 0
TSMAPI:CreateTimeDelay("craftingQueueUpdateThrottle", 0.2, GUI.UpdateQueue) TSMAPI:CreateTimeDelay("craftingQueueUpdateThrottle", 0.2, GUI.UpdateQueue)
end end
end -- no longer casting a spell so discard spellID
TSM.currentspell = nil
end
end end
end end
@@ -317,6 +320,7 @@ function GUI:UpdateTradeSkills()
skillName = GetSkillLineInfo(i) skillName = GetSkillLineInfo(i)
if skillName == "Professions" then --TRADE_SKILLS ) then if skillName == "Professions" then --TRADE_SKILLS ) then
tradeSkill1, header = GetSkillLineInfo(i + 1); tradeSkill1, header = GetSkillLineInfo(i + 1);
if tradeSkill1 == "Mining" then tradeSkill1 = "Smelting" end
if header or not GetSpellInfo(tradeSkill1) then if header or not GetSpellInfo(tradeSkill1) then
tradeSkill1 = nil tradeSkill1 = nil
else else
@@ -324,6 +328,7 @@ function GUI:UpdateTradeSkills()
end end
tradeSkill2, header = GetSkillLineInfo(i + 2); tradeSkill2, header = GetSkillLineInfo(i + 2);
if tradeSkill2 == "Mining" then tradeSkill2 = "Smelting" end
if header or not GetSpellInfo(tradeSkill2) then if header or not GetSpellInfo(tradeSkill2) then
tradeSkill2 = nil tradeSkill2 = nil
else else