Browse Source

Correctly detect smelting recipes (#3)

* Bugfix: Smelting was not being properly detected

* Bugfix: missed a variable cleanup
pull/4/head
Xan-Asc 3 years ago committed by GitHub
parent
commit
bd20d5d614
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      TradeSkillMaster_Crafting/Modules/CraftingGUI.lua

7
TradeSkillMaster_Crafting/Modules/CraftingGUI.lua

@ -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

Loading…
Cancel
Save