Skip to content

Commit

Permalink
Fix for CraftInfoAnywhere not loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
b-morgan committed May 5, 2024
1 parent 91d0aaa commit dd96e3d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions SkillLevelData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,18 @@ function Skillet:GetTradeSkillLevels(itemID, spellID)
b = (tonumber(b) or 0) + rb
c = (tonumber(c) or 0) + rb
d = (tonumber(d) or 0) + rb
self.sourceTradeSkillLevel = 1
end
if levelsByRecipe and type(levelsByRecipe) == 'string' then
e,f,g,h = string.split("/", levelsByRecipe)
e = (tonumber(e) or 0) + rb
f = (tonumber(f) or 0) + rb
g = (tonumber(g) or 0) + rb
h = (tonumber(h) or 0) + rb
self.sourceTradeSkillLevel = 1
end
--
-- For debugging, report the differences
--
if a ~= e then
DA.DEBUG(1,"GetTradeSkillLevels: a= "..tostring(a)..", e= "..tostring(e))
end
Expand All @@ -181,9 +184,9 @@ function Skillet:GetTradeSkillLevels(itemID, spellID)
end
--
-- Choose the best value(s)
-- (e will be nil if CraftInfoAnywhere is not loaded or the Wago Tools table(s) have no data)
-- (levelsByRecipe will be nil if CraftInfoAnywhere is not loaded or the Wago Tools table(s) have no data)
--
if e and self.db.profile.altskilllevels then
if levelsByRecipe and self.db.profile.altskilllevels then
if self.db.profile.baseskilllevel then
a = e
end
Expand Down

0 comments on commit dd96e3d

Please sign in to comment.