Commit fc8e212efb71888fc1819e789f0f07d4e1c51f0d
1 parent
eae157a4
fix: 月卡- 增刊异常
领完当天月卡,在月卡界面购买增刊后,重新刷新主界面、重启游戏都无法领取增刊奖励
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
src/models/Store.lua
@@ -343,6 +343,8 @@ end | @@ -343,6 +343,8 @@ end | ||
343 | 343 | ||
344 | --获取月卡每日奖励 | 344 | --获取月卡每日奖励 |
345 | function Store:getMonthCardDailyReward(id) | 345 | function Store:getMonthCardDailyReward(id) |
346 | + if not id then return nil end | ||
347 | + | ||
346 | if self:isMonthCardExpire() or self:getProperty("monthCardReceive") == 1 then return nil, nil end | 348 | if self:isMonthCardExpire() or self:getProperty("monthCardReceive") == 1 then return nil, nil end |
347 | 349 | ||
348 | local before_ex = self:getProperty("monthCardEx") | 350 | local before_ex = self:getProperty("monthCardEx") |
@@ -369,6 +371,8 @@ end | @@ -369,6 +371,8 @@ end | ||
369 | 371 | ||
370 | --获取特刊每日奖励 | 372 | --获取特刊每日奖励 |
371 | function Store:getSMonthCardDailyReward(id) | 373 | function Store:getSMonthCardDailyReward(id) |
374 | + if not id then return nil end | ||
375 | + | ||
372 | local before_ex = SuperMonthCard["periods"](self, id) | 376 | local before_ex = SuperMonthCard["periods"](self, id) |
373 | local reward, change, cur_ex= SuperMonthCard["itemDaily"](self, id) | 377 | local reward, change, cur_ex= SuperMonthCard["itemDaily"](self, id) |
374 | 378 |