From aca6d6d1f17eaaeeecec47c85a363c557cdc1da0 Mon Sep 17 00:00:00 2001 From: Bruno Lamonato Date: Thu, 28 Mar 2024 10:56:40 -0300 Subject: [PATCH] Update daily_reward.lua --- data/modules/scripts/daily_reward/daily_reward.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/data/modules/scripts/daily_reward/daily_reward.lua b/data/modules/scripts/daily_reward/daily_reward.lua index 815a7e2611c..1f0e805704c 100644 --- a/data/modules/scripts/daily_reward/daily_reward.lua +++ b/data/modules/scripts/daily_reward/daily_reward.lua @@ -462,14 +462,12 @@ function Player.selectDailyReward(self, msg) local description = "" for k, v in ipairs(items) do if dailyTable.itemCharges then - for i = 1, rewardCount do - local inboxItem = inbox:addItem(v.itemId, dailyTable.itemCharges) -- adding charges for each item - if inboxItem then - inboxItem:setAttribute(ITEM_ATTRIBUTE_STORE, systemTime()) - end + local inboxItem = inbox:addItem(v.itemId, dailyTable.itemCharges) -- adding charges for each item + if inboxItem then + inboxItem:setAttribute(ITEM_ATTRIBUTE_STORE, systemTime()) end else - local inboxItem = inbox:addItem(v.itemId, rewardCount) -- adding single item w/o charges + local inboxItem = inbox:addItem(v.itemId, v.count) -- adding single item w/o charges if inboxItem then inboxItem:setAttribute(ITEM_ATTRIBUTE_STORE, systemTime()) end