Mercurial > wow > wowdb-profiler
diff Main.lua @ 352:2776c8b1e253 WoD
Fixed an error with garrison profession NPCs and an error with a debug statement.
author | MMOSimca <MMOSimca@gmail.com> |
---|---|
date | Wed, 08 Oct 2014 15:33:05 -0400 |
parents | e7cbe43d8418 |
children | 6fc3f3e1be54 |
line wrap: on
line diff
--- a/Main.lua Sun Oct 05 17:35:53 2014 -0400 +++ b/Main.lua Wed Oct 08 15:33:05 2014 -0400 @@ -2061,7 +2061,7 @@ end else -- If this is nil, then the item's quantity could be wrong if loot_quantity is wrong, so we won't process this slot's loot. - Debug("%s: Slot quantity is nil for loot slot %d of the entity with GUID %s and Type:ID: %s.", event_name, loot_slot, loot_info[loot_index], source_key) + Debug("%s: Slot quantity is nil for loot slot %d.", event_name, loot_slot) end end end @@ -2402,13 +2402,16 @@ local function RegisterTools(tradeskill_name, tradeskill_index) - local spell_id = tonumber(_G.GetTradeSkillRecipeLink(tradeskill_index):match("^|c%x%x%x%x%x%x%x%x|H%w+:(%d+)")) - local required_tool = _G.GetTradeSkillTools(tradeskill_index) - - if required_tool then - for tool_name, registry in pairs(TRADESKILL_TOOLS) do - if required_tool:find(tool_name) then - registry[spell_id] = true + local link = _G.GetTradeSkillRecipeLink(tradeskill_index) + if link then + local spell_id = tonumber(link:match("^|c%x%x%x%x%x%x%x%x|H%w+:(%d+)")) + local required_tool = _G.GetTradeSkillTools(tradeskill_index) + + if required_tool then + for tool_name, registry in pairs(TRADESKILL_TOOLS) do + if required_tool:find(tool_name) then + registry[spell_id] = true + end end end end