CraftSim

CraftSim

2M Downloads

Lua error when (Death Knight) Runeforging in Ebon Hold

b-morgan opened this issue ยท 2 comments

commented

I got the following Lua error when Runeforging with my Death Knight in Ebon Hold with CraftSim 17.1.4.

2x CraftSim/Classes/ProfessionData.lua:44: bad argument #1 to 'pairs' (table expected, got nil)
[string "=[C]"]: in function `pairs'
[string "@CraftSim/Classes/ProfessionData.lua"]:44: in function `new'
[string "@CraftSim/Libs/classic.lua"]:64: in function `ProfessionData'
[string "@CraftSim/Classes/RecipeData.lua"]:69: in function `new'
[string "@CraftSim/Libs/classic.lua"]:64: in function `RecipeData'
[string "@CraftSim/Init/Init.lua"]:205: in function <CraftSim/Init/Init.lua:183>
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: in function `CraftRecipe'
[string "@Blizzard_Professions/Blizzard_ProfessionsCrafting.lua"]:1004: in function <...lizzard_Professions/Blizzard_ProfessionsCrafting.lua:964>
[string "=[C]"]: in function `CreateInternal'
[string "@Blizzard_Professions/Blizzard_ProfessionsCrafting.lua"]:1040: in function `InvokeCreate'
[string "@Blizzard_Professions/Blizzard_ProfessionsCrafting.lua"]:1062: in function <...lizzard_Professions/Blizzard_ProfessionsCrafting.lua:1037>
[string "=(tail call)"]: ?

Locals:
(*temporary) = nil
(*temporary) = "table expected, got nil"
commented

There is no Enum.Profession.Runeforging so adding to the CraftSim.CONST.TRADESKILLLINEIDS table is probably out but I'm pretty sure that the following change starting at line 44 in ...\CraftSim\Classes\ProfessionData.lua will fix this issue:

	if CraftSim.CONST.TRADESKILLLINEIDS[self.professionInfo.profession] then
		for expansionID, skillLineID in pairs(CraftSim.CONST.TRADESKILLLINEIDS[self.professionInfo.profession]) do
			if skillLineID == self.skillLineID then
				self.expansionID = expansionID
				break
			end
		end
	else
		self.expansionID = CraftSim.CONST.EXPANSION_IDS.WRATH_OF_THE_LICH_KING	
	end
commented

should be fixed with 17.3.1