Commit 71d319ebcc7f8f1445c048ecc9cb38542fdf5a0e

Authored by zhangqijia
1 parent b88939d5

fix: 使用特殊道具也要增加对应的 "购买记录"

Showing 2 changed files with 6 additions and 1 deletions   Show diff stats
src/actions/RoleAction.lua
@@ -1730,6 +1730,11 @@ function _M.itemConvertSpecialRpc(agent, data) @@ -1730,6 +1730,11 @@ function _M.itemConvertSpecialRpc(agent, data)
1730 if not role:checkItemEnough({[itemId] = 1}) then return 3 end 1730 if not role:checkItemEnough({[itemId] = 1}) then return 3 end
1731 1731
1732 local reward = {} 1732 local reward = {}
  1733 +
  1734 + if not role.storeData:checkRechargeRecord(rechargeData.limit, exchangeId)then
  1735 + return 5
  1736 + end
  1737 +
1733 if rechargeData.type == CardType.ActBattleCommandCard then 1738 if rechargeData.type == CardType.ActBattleCommandCard then
1734 if role.activity:isOpenById(rechargeData.activity_id, "ActShopGoods") then 1739 if role.activity:isOpenById(rechargeData.activity_id, "ActShopGoods") then
1735 local tmpreward, _ = role.storeData:onBuyCard(rechargeData.type, rechargeData.time, rechargeData.id, rechargeData.activity_id) 1740 local tmpreward, _ = role.storeData:onBuyCard(rechargeData.type, rechargeData.time, rechargeData.id, rechargeData.activity_id)
src/models/RolePlugin.lua
@@ -2435,7 +2435,7 @@ function RolePlugin.bind(Role) @@ -2435,7 +2435,7 @@ function RolePlugin.bind(Role)
2435 return 1 2435 return 1
2436 end 2436 end
2437 2437
2438 - if not self.storeData:checkRechargeRecord(rechargeData.limit, id) and rechargeData.shop ~= 2 then 2438 + if not self.storeData:checkRechargeRecord(rechargeData.limit, id)then
2439 return 2 2439 return 2
2440 end 2440 end
2441 2441