Commit b0a6cf59919a846de6be70667bdd9fdfbebacf2d
1 parent
9fa9ebd9
fix: 购买战令后,奖励没发放的bug
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
src/models/Store.lua
| ... | ... | @@ -474,7 +474,7 @@ function Store:onBuyCard(type, duration, id, actid) |
| 474 | 474 | self:updateProperty({field = "bpInfo", value = bpInfo}) |
| 475 | 475 | elseif type == CardType.ActBattleCommandCard then |
| 476 | 476 | if not self.owner.activity:isOpenById(actid, "ActShopGoods") then |
| 477 | - return | |
| 477 | + return nil | |
| 478 | 478 | end |
| 479 | 479 | local actCfg = csvdb["activity_ctrlCsv"][actid] |
| 480 | 480 | if not actCfg then return end |
| ... | ... | @@ -486,6 +486,10 @@ function Store:onBuyCard(type, duration, id, actid) |
| 486 | 486 | end |
| 487 | 487 | self.owner:mylog("act_action", {desc="buyBc", int1=id, int2=actData["lvl"] or 0}) |
| 488 | 488 | self.owner.activity:updateActData("BattleCommand", actData) |
| 489 | + local rechargeData = csvdb["shop_rechargeCsv"][id] | |
| 490 | + if rechargeData then | |
| 491 | + return self.owner:award(rechargeData.itemFirst, {isRecharge = true, log = {desc = "recharge", int1 = id}}) | |
| 492 | + end | |
| 489 | 493 | end |
| 490 | 494 | return nil, nil |
| 491 | 495 | end | ... | ... |