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. 5
      TradeSkillMaster_Crafting/Modules/CraftingGUI.lua

5
TradeSkillMaster_Crafting/Modules/CraftingGUI.lua

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

Loading…
Cancel
Save