Skip to content

Commit

Permalink
Fixed lua error when no items exist for slot or slot is unknown.
Browse files Browse the repository at this point in the history
  • Loading branch information
ckaotik committed May 30, 2015
1 parent 7ecdcda commit 4a97150
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion defaultcalculation.class.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ end
--- choose the next current item for the given slot while making sure it's a valid choice
function DefaultCalculation:ChooseNextItem(slotID)
local currentItems = self:GetItems(slotID)
if #currentItems > 0 then
if items and #currentItems > 0 then
self.slotCounters[slotID] = self.slotCounters[slotID] + 1
while self.slotCounters[slotID] <= #currentItems and (self:IsDuplicateItem(slotID) or self:UniquenessViolated(slotID) or (not self:IsOffhandValid(slotID))) do
self.slotCounters[slotID] = self.slotCounters[slotID] + 1
Expand Down

0 comments on commit 4a97150

Please sign in to comment.