Commit e82cb5dc57713c47bc11fcc00e23146f4c2daf5c

Authored by zhangqijia
1 parent 2820ba20

fix: level_addition新增类型17 每日奖励关卡挑战卡可购买次数增加

src/GlobalVar.lua
... ... @@ -422,4 +422,5 @@ SystemBnousType = {
422 422 TreasureBaseMaximum = 14, -- 增加宝藏资源值上限
423 423 UpSpeedNum = 15, -- 加速次数上限增加 15=1探索加速or 2齿轮加速or 3餐厅加速=增加次数
424 424 ChangeBaseCount = 16, -- 每日奖励关卡挑战卡基础数量增加
  425 + ChangeBuyCount = 17, -- 每日奖励关卡挑战卡可购买次数增加,
425 426 }
... ...
src/actions/HangAction.lua
... ... @@ -580,7 +580,7 @@ function _M.buyBonusCountRpc(agent, data)
580 580 local bonusC = role.dailyData:getProperty("bonusC")
581 581 local extraCnt = role.storeData:getBonusExtraFightCount()
582 582 bonusC[btype] = bonusC[btype] or {c = 0, b = 0}
583   - local lastCount = globalCsv.bonus_daily_buy_count * coef + extraCnt - bonusC[btype]["b"]
  583 + local lastCount = (globalCsv.bonus_daily_buy_count + role:getBnousChangeBuyCount()) * coef + extraCnt - bonusC[btype]["b"]
584 584 if math.illegalNum(count, 1, lastCount) then return 1 end
585 585  
586 586 if not role:checkItemEnough({[ItemId.Jade] = globalCsv.bonus_buy_cost * count}) then return 2 end
... ...
src/models/RolePlugin.lua
... ... @@ -2864,6 +2864,10 @@ function RolePlugin.bind(Role)
2864 2864 return self:getProperty("levelBnous")[SystemBnousType.ChangeBaseCount] or 0
2865 2865 end
2866 2866  
  2867 + function Role:getBnousChangeBuyCount()
  2868 + return self:getProperty("levelBnous")[SystemBnousType.ChangeBuyCount] or 0
  2869 + end
  2870 +
2867 2871 function Role:getLevelBnous(level)
2868 2872 local levelBnous = self:getProperty("levelBnous")
2869 2873 local additionData = csvdb["level_additionCsv"][level]
... ... @@ -2882,10 +2886,10 @@ function RolePlugin.bind(Role)
2882 2886 end
2883 2887 levelBnous[pm1][pm4][pm2] = (levelBnous[pm1][pm4][pm2] or 0) + pm3
2884 2888 elseif pm1 == SystemBnousType.HangTime or
2885   - pm1 == SystemBnousType.ExploreMaximum or
2886 2889 pm1 == SystemBnousType.DismantlingMaximum or
2887 2890 pm1 == SystemBnousType.TreasureBaseMaximum or
2888   - pm1 == SystemBnousType.ChangeBaseCount then
  2891 + pm1 == SystemBnousType.ChangeBaseCount or
  2892 + pm1 == SystemBnousType.ChangeBuyCount then
2889 2893 if type(levelBnous[pm1]) == "table" then
2890 2894 levelBnous[pm1] = 0
2891 2895 end
... ...