Skip to content

Commit

Permalink
Fix null function on daily reward (#375)
Browse files Browse the repository at this point in the history
Resolves #374
  • Loading branch information
dudantas authored Jun 16, 2022
1 parent 6ad0268 commit 1960d49
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions data/modules/scripts/daily_reward/daily_reward.lua
Original file line number Diff line number Diff line change
Expand Up @@ -459,13 +459,12 @@ function Player.selectDailyReward(self, msg)

local description = ""
for k, v in ipairs(items) do
local item = Game.getItemIdByClientId(v.spriteId)
if dailyTable.itemCharges then
for i = 1, v.count do
inbox:addItem(item:getId(), dailyTable.itemCharges) -- adding charges for each item
inbox:addItem(v.ItemId, dailyTable.itemCharges) -- adding charges for each item
end
else
inbox:addItem(item:getId(), v.count) -- adding single item w/o charges
inbox:addItem(v.ItemId, v.count) -- adding single item w/o charges
end
if k ~= columnsPicked then
description = description .. "" .. v.count .. "x " .. ItemType(item:getId()):getName() .. ", "
Expand Down

0 comments on commit 1960d49

Please sign in to comment.