Skip to content

Commit

Permalink
Fix null function on daily reward
Browse files Browse the repository at this point in the history
Resolves #374
  • Loading branch information
dudantas authored May 4, 2022
1 parent 44c8e82 commit 71d395c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions data/modules/scripts/daily_reward/daily_reward.lua
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,9 @@ 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
Expand Down

0 comments on commit 71d395c

Please sign in to comment.