Commit e2e205bee8bbf028476d2134243657a934f3b610

Authored by zhangqijia
1 parent 756cd488

feat: 玩家等级奖励

@@ -397,10 +397,16 @@ TeamSystemType = { @@ -397,10 +397,16 @@ TeamSystemType = {
397 Dinner = 4, 397 Dinner = 4,
398 FriendBattle = 5, 398 FriendBattle = 5,
399 } 399 }
  400 +-- 加速类型
  401 +UpSpeedType = {
  402 + ExplorationUpSpeed = 1, -- 探索加速
  403 + GearUpSpeed = 2, -- 齿轮加速
  404 + Restaurant = 3, -- 餐厅加速
400 405
  406 +}
401 -- 某个功能对其他系统功能的加成类型 407 -- 某个功能对其他系统功能的加成类型
402 SystemBnousType = { 408 SystemBnousType = {
403 - TowerBuff = 1, -- 电波塔内战斗开始时获得buff 409 + TowerBuff = 1, -- 电波塔内战斗开始时获得buff or
404 CrusadeTask = 2, -- 讨伐电台任务加速 410 CrusadeTask = 2, -- 讨伐电台任务加速
405 DinerGet = 3, -- 食材供应商获取速度 411 DinerGet = 3, -- 食材供应商获取速度
406 DinerLimit = 4, -- 食材供应商上限 412 DinerLimit = 4, -- 食材供应商上限
@@ -410,4 +416,10 @@ SystemBnousType = { @@ -410,4 +416,10 @@ SystemBnousType = {
410 HangTime = 8, -- 挂机时间上限 416 HangTime = 8, -- 挂机时间上限
411 PvpTicket = 9, -- 每周额外获得竞技场门票数量 417 PvpTicket = 9, -- 每周额外获得竞技场门票数量
412 SweepReward = 10, -- 奖励关卡每次扫荡额外获得道具 418 SweepReward = 10, -- 奖励关卡每次扫荡额外获得道具
  419 + DismantlingMaximum = 11,-- 拆解术式模块运行时间上限
  420 + DismantlingImproved = 12,-- 拆解术式构筑效率提升
  421 + DailyReward = 13,-- 每日签到额外获得道具
  422 + TreasureBaseMaximum = 14, -- 增加宝藏资源值上限
  423 + UpSpeedNum = 15, -- 加速次数上限增加 15=1探索加速or 2齿轮加速or 3餐厅加速=增加次数
  424 + ChangeBaseCount = 16, -- 每日奖励关卡挑战卡基础数量增加
413 } 425 }
src/actions/ActivityAction.lua
@@ -136,7 +136,14 @@ function _M.signRpc(agent, data) @@ -136,7 +136,14 @@ function _M.signRpc(agent, data)
136 end 136 end
137 signs[curDay] = yearMonth 137 signs[curDay] = yearMonth
138 138
139 - local reward, change = role:award(monthData[curDay].item, {log = {desc = "sign", int1 = yearMonth, int2 = curDay}}) 139 + -- 达到一定等级,签到会有额外奖励
  140 + local reward = role:getBnousDaily()
  141 + local change
  142 + local award = monthData[curDay].item:toNumMap() or {}
  143 + for k, v in pairs(award) do
  144 + reward[k] = (reward[k] or 0) + v
  145 + end
  146 + reward, change = role:award(reward, {log = {desc = "sign", int1 = yearMonth, int2 = curDay}})
140 role:changeUpdates({{type = "sign", field = curDay, value = yearMonth}}) 147 role:changeUpdates({{type = "sign", field = curDay, value = yearMonth}})
141 role:checkTaskEnter("SignIn") 148 role:checkTaskEnter("SignIn")
142 149
src/actions/DinerAction.lua
@@ -251,11 +251,20 @@ end @@ -251,11 +251,20 @@ end
251 function _M.expediteSellRpc( agent, data ) 251 function _M.expediteSellRpc( agent, data )
252 local role = agent.role 252 local role = agent.role
253 local count = role.dinerData:getProperty("expedite") 253 local count = role.dinerData:getProperty("expedite")
254 - local max = #globalCsv.diner_sell_quick_cost  
255 - if count > max then  
256 - return 1 254 + local maxIdx = #globalCsv.diner_sell_quick_cost
  255 +
  256 + -- 增加今日餐厅加速次数
  257 + local max = maxIdx + role:getBnousUpSpeedNum(UpSpeedType.Restaurant)
  258 + if count > max then return 1 end
  259 +
  260 + local costs = clone(globalCsv.diner_sell_quick_cost)
  261 + if count > maxIdx then
  262 + for idx = maxIdx+1, count do
  263 + costs[idx] = costs[maxIdx]
  264 + end
257 end 265 end
258 - local diamond = globalCsv.diner_sell_quick_cost[count] 266 +
  267 + local diamond = costs[count]
259 if diamond > 0 then 268 if diamond > 0 then
260 local cost = {[ItemId.Jade] = diamond} 269 local cost = {[ItemId.Jade] = diamond}
261 if not role:checkItemEnough(cost) then 270 if not role:checkItemEnough(cost) then
src/actions/EmailAction.lua
@@ -124,6 +124,8 @@ function _M.drawAllAttachRpc(agent, data) @@ -124,6 +124,8 @@ function _M.drawAllAttachRpc(agent, data)
124 role:mylog("mail_action", {desc = "draw_attach", int1 = email:getProperty("emailId"), key1 = email:getProperty("title"), key2 = attachments}) 124 role:mylog("mail_action", {desc = "draw_attach", int1 = email:getProperty("emailId"), key1 = email:getProperty("title"), key2 = attachments})
125 end 125 end
126 end 126 end
  127 + if role:checkRuneFullyByReward(reward) then return 1 end
  128 +
127 reward, change = role:award(reward, {log = {desc = "draw_attach"}}) 129 reward, change = role:award(reward, {log = {desc = "draw_attach"}})
128 SendPacket(actionCodes.Email_drawAllAttachRpc, MsgPack.pack({ids = ids, reward = reward, change = change})) 130 SendPacket(actionCodes.Email_drawAllAttachRpc, MsgPack.pack({ids = ids, reward = reward, change = change}))
129 return true 131 return true
@@ -143,8 +145,17 @@ function _M.drawAttachRpc(agent, data) @@ -143,8 +145,17 @@ function _M.drawAttachRpc(agent, data)
143 local attachments = getEmailAttachments(email) 145 local attachments = getEmailAttachments(email)
144 if attachments == "" then return end 146 if attachments == "" then return end
145 147
146 - local reward, change = role:award(attachments, {log = {desc = "draw_attach", int1 = id}}) 148 + local reward, change = {}
  149 + if type(attachments) == "string" then
  150 + for key, v in pairs(attachments:toNumMap()) do
  151 + reward[key] = (reward[key] or 0) + v
  152 + end
  153 + else
  154 + reward = attachments
  155 + end
147 if role:checkRuneFullyByReward(reward) then return 1 end 156 if role:checkRuneFullyByReward(reward) then return 1 end
  157 + reward, change = role:award(reward, {log = {desc = "draw_attach", int1 = id}})
  158 +
148 159
149 email:setProperty("status", 2, true) 160 email:setProperty("status", 2, true)
150 email:log(role, 2) 161 email:log(role, 2)
src/actions/HangAction.lua
@@ -478,6 +478,18 @@ function _M.quickRpc(agent , data) @@ -478,6 +478,18 @@ function _M.quickRpc(agent , data)
478 478
479 local curCount = role.dailyData:getProperty("hangQC") + 1 479 local curCount = role.dailyData:getProperty("hangQC") + 1
480 local costs = globalCsv.idle_quickproduce_cost:toArray(true, "=") 480 local costs = globalCsv.idle_quickproduce_cost:toArray(true, "=")
  481 +
  482 + -- 增加今日探索加速次数
  483 + local maxIdx = #costs
  484 + local maxCount = maxIdx + role:getBnousUpSpeedNum(UpSpeedType.ExplorationUpSpeed)
  485 + if curCount > maxCount then return end
  486 +
  487 + if curCount > maxIdx then
  488 + for idx = maxIdx+1, curCount do
  489 + costs[idx] = costs[maxIdx]
  490 + end
  491 + end
  492 +
481 if not costs[curCount] then return end 493 if not costs[curCount] then return end
482 if costs[curCount] > 0 then 494 if costs[curCount] > 0 then
483 if not role:checkItemEnough({[ItemId.Jade] = costs[curCount]}) then return end 495 if not role:checkItemEnough({[ItemId.Jade] = costs[curCount]}) then return end
@@ -666,7 +678,7 @@ function _M.startBonusBattleRpc(agent, data) @@ -666,7 +678,7 @@ function _M.startBonusBattleRpc(agent, data)
666 if open and actData then 678 if open and actData then
667 coef = tonumber(actData.condition2) 679 coef = tonumber(actData.condition2)
668 end 680 end
669 - if math.illegalNum(count, 1, globalCsv.bonus_daily_count * coef + extraCnt - bonusC[bonusData.type]["c"]) then return 7 end 681 + if math.illegalNum(count, 1, (globalCsv.bonus_daily_count + role:getBnousChangeBaseCount()) * coef + extraCnt - bonusC[bonusData.type]["c"]) then return 7 end
670 682
671 bonusC[bonusData.type]["c"] = bonusC[bonusData.type]["c"] + count 683 bonusC[bonusData.type]["c"] = bonusC[bonusData.type]["c"] + count
672 role.dailyData:updateProperty({field = "bonusC", value = bonusC}) 684 role.dailyData:updateProperty({field = "bonusC", value = bonusC})
src/actions/RoleAction.lua
@@ -633,6 +633,7 @@ function _M.openTimeBoxRpc(agent, data) @@ -633,6 +633,7 @@ function _M.openTimeBoxRpc(agent, data)
633 else 633 else
634 local oldId, process, time = boxL[slot].id, boxL[slot].process, boxL[slot].time 634 local oldId, process, time = boxL[slot].id, boxL[slot].process, boxL[slot].time
635 local unitTime = globalCsv.box_key_time[oldId] * 60 635 local unitTime = globalCsv.box_key_time[oldId] * 60
  636 + unitTime = unitTime + role:getBnousDismantlingImproved(unitTime)
636 local doneCnt = time == 0 and 0 or math.floor((process + skynet.timex() - time) / unitTime) 637 local doneCnt = time == 0 and 0 or math.floor((process + skynet.timex() - time) / unitTime)
637 if doneCnt > 0 then 638 if doneCnt > 0 then
638 reward = role:award({[oldId] = doneCnt}, {log = {desc = "openTimeBox", int1 = slot, int2 = oper}}) 639 reward = role:award({[oldId] = doneCnt}, {log = {desc = "openTimeBox", int1 = slot, int2 = oper}})
@@ -642,7 +643,7 @@ function _M.openTimeBoxRpc(agent, data) @@ -642,7 +643,7 @@ function _M.openTimeBoxRpc(agent, data)
642 if role:getItemCount(itemId) >= limit then return 3 end 643 if role:getItemCount(itemId) >= limit then return 3 end
643 644
644 boxL[slot] = {id = itemId, process = 0, time = skynet.timex()} 645 boxL[slot] = {id = itemId, process = 0, time = skynet.timex()}
645 - role:pushMsg({type = "box", slot = slot, time = skynet.timex() + globalCsv.box_productLine_time * 3600}) 646 + role:pushMsg({type = "box", slot = slot, time = skynet.timex() + globalCsv.box_productLine_time * 3600 + role:getBnousDismantlingMaximum()})
646 elseif oper == 2 then -- 重置运行时间(可以使用加速) 647 elseif oper == 2 then -- 重置运行时间(可以使用加速)
647 local quick = msg.quick 648 local quick = msg.quick
648 if not boxL[slot] then return 4 end 649 if not boxL[slot] then return 4 end
@@ -652,6 +653,7 @@ function _M.openTimeBoxRpc(agent, data) @@ -652,6 +653,7 @@ function _M.openTimeBoxRpc(agent, data)
652 local stopTime = nowTime 653 local stopTime = nowTime
653 local itemData = csvdb["itemCsv"][itemId] 654 local itemData = csvdb["itemCsv"][itemId]
654 local unitTime = globalCsv.box_key_time[itemId] * 60 655 local unitTime = globalCsv.box_key_time[itemId] * 60
  656 + unitTime = unitTime + role:getBnousDismantlingImproved(unitTime)
655 if quick then 657 if quick then
656 stopTime = nowTime + quick 658 stopTime = nowTime + quick
657 local cost_pre = globalCsv.box_timeOpen_diamond:toArray(true, "=") 659 local cost_pre = globalCsv.box_timeOpen_diamond:toArray(true, "=")
@@ -661,6 +663,8 @@ function _M.openTimeBoxRpc(agent, data) @@ -661,6 +663,8 @@ function _M.openTimeBoxRpc(agent, data)
661 else 663 else
662 stopTime = math.min(nowTime,time + globalCsv.box_productLine_time * 3600) 664 stopTime = math.min(nowTime,time + globalCsv.box_productLine_time * 3600)
663 end 665 end
  666 + stopTime = stopTime + role:getBnousDismantlingMaximum()
  667 +
664 role:pushCancel({type = "box", slot = slot}) 668 role:pushCancel({type = "box", slot = slot})
665 669
666 local doneCnt = math.floor((process + stopTime - time) / unitTime) 670 local doneCnt = math.floor((process + stopTime - time) / unitTime)
@@ -672,21 +676,23 @@ function _M.openTimeBoxRpc(agent, data) @@ -672,21 +676,23 @@ function _M.openTimeBoxRpc(agent, data)
672 end 676 end
673 677
674 boxL[slot] = {id = itemId, process = (process + stopTime - time) % unitTime, time = nowTime} 678 boxL[slot] = {id = itemId, process = (process + stopTime - time) % unitTime, time = nowTime}
675 - role:pushMsg({type = "box", slot = slot, time = nowTime + globalCsv.box_productLine_time * 3600}) 679 + role:pushMsg({type = "box", slot = slot, time = nowTime + globalCsv.box_productLine_time * 3600 + role:getBnousDismantlingMaximum()})
676 elseif oper == 3 then -- 开箱子 680 elseif oper == 3 then -- 开箱子
677 local costId = msg.costId 681 local costId = msg.costId
678 local costs = (msg.costs or ""):toNumMap() 682 local costs = (msg.costs or ""):toNumMap()
679 if not costId or not csvdb["itemCsv"][costId] or not next(costs) then return 6 end 683 if not costId or not csvdb["itemCsv"][costId] or not next(costs) then return 6 end
680 684
681 local costIdData = csvdb["itemCsv"][costId] 685 local costIdData = csvdb["itemCsv"][costId]
682 - local count = 0 686 + local count, runeCount = 0, 0
683 for itemId, num in pairs(costs) do 687 for itemId, num in pairs(costs) do
684 local itemIdData = csvdb["itemCsv"][itemId] 688 local itemIdData = csvdb["itemCsv"][itemId]
685 if not itemIdData or not csvdb["item_randomCsv"][itemId] or costIdData.quality ~= itemIdData.quality then return 7 end 689 if not itemIdData or not csvdb["item_randomCsv"][itemId] or costIdData.quality ~= itemIdData.quality then return 7 end
  690 +
  691 + if itemIdData.type == ItemType.Rune then runeCount = runeCount + num end
686 count = count + num 692 count = count + num
687 end 693 end
688 694
689 - if role:checkRuneFully(count) then return 10 end --开箱子,如果铭文仓库已经满了则不让开箱 695 + if role:checkRuneFully(runeCount) then return 10 end --开箱子,如果铭文仓库已经满了则不让开箱
690 696
691 if role:getItemCount(costId) < count then return 8 end 697 if role:getItemCount(costId) < count then return 8 end
692 if not role:checkItemEnough(costs) then return 9 end 698 if not role:checkItemEnough(costs) then return 9 end
@@ -701,8 +707,8 @@ function _M.openTimeBoxRpc(agent, data) @@ -701,8 +707,8 @@ function _M.openTimeBoxRpc(agent, data)
701 role:costItems({[itemId] = value}, {log = {desc = "openTimeBox"}}) 707 role:costItems({[itemId] = value}, {log = {desc = "openTimeBox"}})
702 for _ = 1, value do 708 for _ = 1, value do
703 for i = 1, 10 do 709 for i = 1, 10 do
704 - local num = randomData["num" .. i]  
705 - local gift = randomData["gift" .. i] 710 + local num = randomData["num" .. tostring(i)]
  711 + local gift = randomData["gift" .. tostring(i)]
706 if num and gift and num > 0 and gift ~= "" then 712 if num and gift and num > 0 and gift ~= "" then
707 local pool = {} 713 local pool = {}
708 for _, temp in ipairs(gift:toArray()) do 714 for _, temp in ipairs(gift:toArray()) do
@@ -1392,7 +1398,20 @@ end @@ -1392,7 +1398,20 @@ end
1392 function _M.goldBuyRpc(agent, data) 1398 function _M.goldBuyRpc(agent, data)
1393 local role = agent.role 1399 local role = agent.role
1394 local curT = role.dailyData:getProperty("goldBuyT") 1400 local curT = role.dailyData:getProperty("goldBuyT")
1395 - local costD = globalCsv.idle_quickMoney_cost[curT] 1401 +
  1402 + local costs = clone(globalCsv.idle_quickMoney_cost)
  1403 + -- 增加今日齿轮加速次数
  1404 + local maxIdx = #globalCsv.idle_quickMoney_cost
  1405 + local maxCount = maxIdx + role:getBnousUpSpeedNum(UpSpeedType.GearUpSpeed)
  1406 + if curT > maxCount then return end
  1407 + if curT > maxIdx then
  1408 + for idx = maxIdx+1, curCount do
  1409 + costs[idx] = costs[maxIdx]
  1410 + end
  1411 + end
  1412 +
  1413 + local costD = costs[curT]
  1414 +
1396 if not costD then 1415 if not costD then
1397 return 1 1416 return 1
1398 end 1417 end
src/models/Role.lua
@@ -75,6 +75,7 @@ Role.schema = { @@ -75,6 +75,7 @@ Role.schema = {
75 expireItem = {"table", {}}, --物品过期检查 75 expireItem = {"table", {}}, --物品过期检查
76 funcOpen = {"table", {}}, --功能是否开放 76 funcOpen = {"table", {}}, --功能是否开放
77 funcLv = {"table", {}}, --功能等级 77 funcLv = {"table", {}}, --功能等级
  78 + levelBnous = {"table", {}}, --等级奖励
78 -- loveStatus = {"string", ""}, --统计角色的最高 好感度等级 类型相关 -- type=loveL type=loveL 79 -- loveStatus = {"string", ""}, --统计角色的最高 好感度等级 类型相关 -- type=loveL type=loveL
79 crown = {"number", 0}, -- 看伴娘 80 crown = {"number", 0}, -- 看伴娘
80 silent = {"number", 0}, --禁言解禁时间 81 silent = {"number", 0}, --禁言解禁时间
@@ -349,6 +350,7 @@ function Role:data() @@ -349,6 +350,7 @@ function Role:data()
349 items = self:getProperty("items"):toNumMap(), 350 items = self:getProperty("items"):toNumMap(),
350 funcOpen = self:getProperty("funcOpen"), 351 funcOpen = self:getProperty("funcOpen"),
351 funcLv = self:getProperty("funcLv"), 352 funcLv = self:getProperty("funcLv"),
  353 + levelBnous = self:getProperty("levelBnous"),
352 -- loveStatus = self:getProperty("loveStatus"):toNumMap(), 354 -- loveStatus = self:getProperty("loveStatus"):toNumMap(),
353 timeReset = self:getProperty("timeReset"), 355 timeReset = self:getProperty("timeReset"),
354 diamond = self:getAllDiamond(), 356 diamond = self:getAllDiamond(),
src/models/RolePlugin.lua
@@ -284,6 +284,7 @@ function RolePlugin.bind(Role) @@ -284,6 +284,7 @@ function RolePlugin.bind(Role)
284 newExp = newExp - csvdb["player_expCsv"][level].exp 284 newExp = newExp - csvdb["player_expCsv"][level].exp
285 level = level + 1 285 level = level + 1
286 self:checkTaskEnter("RoleLevelUp", {level = level}) 286 self:checkTaskEnter("RoleLevelUp", {level = level})
  287 + self:getLevelBnous(level)
287 else 288 else
288 newExp = csvdb["player_expCsv"][level].exp - 1 -- 没有下一级了 经验溢出太多 扣除 289 newExp = csvdb["player_expCsv"][level].exp - 1 -- 没有下一级了 经验溢出太多 扣除
289 end 290 end
@@ -2753,45 +2754,145 @@ function RolePlugin.bind(Role) @@ -2753,45 +2754,145 @@ function RolePlugin.bind(Role)
2753 2754
2754 function Role:getBnousCrusade(value) 2755 function Role:getBnousCrusade(value)
2755 local towerBnous = self:getTowerBnousActive() 2756 local towerBnous = self:getTowerBnousActive()
2756 - return self:getDeltaValue(towerBnous[SystemBnousType.CrusadeTask], value) 2757 + local levelValue = self:getDeltaValue(self:getProperty("levelBnous")[SystemBnousType.CrusadeTask], value)
  2758 + local towerValue = self:getDeltaValue(towerBnous[SystemBnousType.CrusadeTask], value)
  2759 + return levelValue + towerValue
2757 end 2760 end
2758 2761
2759 function Role:getBnousDiner(type, value) 2762 function Role:getBnousDiner(type, value)
2760 local towerBnous = self:getTowerBnousActive() 2763 local towerBnous = self:getTowerBnousActive()
2761 type = type or 1 2764 type = type or 1
2762 - local result 2765 + local result, levelReault
2763 if type == 1 then 2766 if type == 1 then
2764 result = towerBnous[SystemBnousType.DinerGet] 2767 result = towerBnous[SystemBnousType.DinerGet]
  2768 + levelReault = self:getProperty("levelBnous")[SystemBnousType.DinerGet]
2765 elseif type == 2 then 2769 elseif type == 2 then
2766 result = towerBnous[SystemBnousType.DinerLimit] 2770 result = towerBnous[SystemBnousType.DinerLimit]
  2771 + levelReault = self:getProperty("levelBnous")[SystemBnousType.DinerLimit]
2767 elseif type == 3 then 2772 elseif type == 3 then
2768 result = towerBnous[SystemBnousType.DinerSell] 2773 result = towerBnous[SystemBnousType.DinerSell]
  2774 + levelReault = self:getProperty("levelBnous")[SystemBnousType.DinerSell]
2769 elseif type == 4 then 2775 elseif type == 4 then
2770 result = towerBnous[SystemBnousType.DinerPrice] 2776 result = towerBnous[SystemBnousType.DinerPrice]
  2777 + levelReault = self:getProperty("levelBnous")[SystemBnousType.DinerPrice]
2771 end 2778 end
2772 - return self:getDeltaValue(result, value) 2779 + return self:getDeltaValue(result, value) + self:getDeltaValue(levelReault, value)
2773 end 2780 end
2774 2781
  2782 + local function appendBnous(dstBnous, srcBnous)
  2783 + if not dstBnous or not srcBnous then return end
  2784 + for time, set in pairs(srcBnous) do
  2785 + if not dstBnous[time] then
  2786 + dstBnous[time] = {}
  2787 + end
  2788 + for key, value in pairs(set) do
  2789 + dstBnous[time][key] = (dstBnous[time][key] or 0) + value
  2790 + end
  2791 + end
  2792 + end
2775 function Role:getBnousAdv() 2793 function Role:getBnousAdv()
2776 local towerBnous = self:getTowerBnousActive() 2794 local towerBnous = self:getTowerBnousActive()
  2795 + local levelBnous = self:getProperty("levelBnous")[SystemBnousType.Adv] or {}
  2796 + appendBnous(towerBnous[SystemBnousType.Adv], levelBnous)
2777 return towerBnous[SystemBnousType.Adv] or {} 2797 return towerBnous[SystemBnousType.Adv] or {}
2778 end 2798 end
2779 2799
2780 function Role:getBnousHangTime() 2800 function Role:getBnousHangTime()
2781 local towerBnous = self:getTowerBnousActive() 2801 local towerBnous = self:getTowerBnousActive()
2782 - return towerBnous[SystemBnousType.HangTime] or 0 2802 + local levelBnous = self:getProperty("levelBnous") or {}
  2803 + local tmptime = 0
  2804 + if next(levelBnous) then
  2805 + tmptime = levelBnous[SystemBnousType.HangTime] or 0
  2806 + end
  2807 + return towerBnous[SystemBnousType.HangTime] or 0 + tmptime
2783 end 2808 end
2784 2809
2785 function Role:getBnousPvpTicket() 2810 function Role:getBnousPvpTicket()
2786 local towerBnous = self:getTowerBnousActive() 2811 local towerBnous = self:getTowerBnousActive()
  2812 + local levelBnous = self:getProperty("levelBnous")[SystemBnousType.PvpTicket] or {}
  2813 + appendBnous(towerBnous[SystemBnousType.PvpTicket], levelBnous)
2787 return towerBnous[SystemBnousType.PvpTicket] or {} 2814 return towerBnous[SystemBnousType.PvpTicket] or {}
2788 end 2815 end
2789 2816
2790 function Role:getBnousSweep() 2817 function Role:getBnousSweep()
2791 local towerBnous = self:getTowerBnousActive() 2818 local towerBnous = self:getTowerBnousActive()
  2819 + local levelBnous = self:getProperty("levelBnous")[SystemBnousType.SweepReward] or {}
  2820 + appendBnous(towerBnous[SystemBnousType.SweepReward], levelBnous)
2792 return towerBnous[SystemBnousType.SweepReward] or {} 2821 return towerBnous[SystemBnousType.SweepReward] or {}
2793 end 2822 end
2794 2823
  2824 + function Role:getBnousDismantlingMaximum()
  2825 + return self:getProperty("levelBnous")[SystemBnousType.DismantlingMaximum] or 0
  2826 + end
  2827 +
  2828 + function Role:getBnousDismantlingImproved(value)
  2829 + local result = self:getProperty("levelBnous")[SystemBnousType.DismantlingImproved] or {}
  2830 + return self:getDeltaValue(result, value)
  2831 + end
  2832 +
  2833 + function Role:getBnousDaily()
  2834 + local reward = {}
  2835 + local levelBnous = self:getProperty("levelBnous")[SystemBnousType.DailyReward] or {}
  2836 + for k, v in pairs(levelBnous) do
  2837 + reward[k] = (reward[k] or 0) + v
  2838 + end
  2839 + return reward
  2840 + end
  2841 +
  2842 + function Role:getBnousTreasureBaseMaximum()
  2843 + local levelBnous = self:getProperty("levelBnous")[SystemBnousType.TreasureBaseMaximum] or 0
  2844 + local treasureBase = self.dailyData:getProperty("treasureBase") + levelBnous
  2845 + self.dailyData:updateProperty({field = "treasureBase", value = treasureBase})
  2846 + end
  2847 +
  2848 + --@upType 加速类型 1探索加速, 2齿轮加速, 3餐厅加速
  2849 + function Role:getBnousUpSpeedNum(upType)
  2850 + local levelBnous = self:getProperty("levelBnous")[SystemBnousType.UpSpeedNum] or {}
  2851 + if next(levelBnous) then
  2852 + return levelBnous[upType] or 0
  2853 + end
  2854 + return 0
  2855 + end
  2856 +
  2857 + function Role:getBnousChangeBaseCount()
  2858 + return self:getProperty("levelBnous")[SystemBnousType.ChangeBaseCount] or 0
  2859 + end
  2860 +
  2861 + function Role:getLevelBnous(level)
  2862 + local levelBnous = self:getProperty("levelBnous")
  2863 + local additionData = csvdb["level_additionCsv"][level]
  2864 + if additionData then
  2865 + local effects = additionData.effect:toTableArraySec()
  2866 + for _, effect in pairs(effects) do
  2867 + local pm1, pm2, pm3, pm4 = tonumber(effect[1]), tonumber(effect[2]), tonumber(effect[3]), tonumber(effect[4])
  2868 + if not levelBnous[pm1] then
  2869 + levelBnous[pm1] = {}
  2870 + end
  2871 + if pm1 == SystemBnousType.TowerBuff then
  2872 +
  2873 + elseif pm1 == SystemBnousType.Adv then
  2874 + if not levelBnous[pm1][pm4] then
  2875 + levelBnous[pm1][pm4] = {}
  2876 + end
  2877 + levelBnous[pm1][pm4][pm2] = (levelBnous[pm1][pm4][pm2] or 0) + pm3
  2878 + elseif pm1 == SystemBnousType.HangTime or
  2879 + pm1 == SystemBnousType.ExploreMaximum or
  2880 + pm1 == SystemBnousType.DismantlingMaximum or
  2881 + pm1 == SystemBnousType.TreasureBaseMaximum or
  2882 + pm1 == SystemBnousType.ChangeBaseCount then
  2883 + if type(levelBnous[pm1]) == "table" then
  2884 + levelBnous[pm1] = 0
  2885 + end
  2886 + levelBnous[pm1] = levelBnous[pm1] + pm2
  2887 + else
  2888 + levelBnous[pm1][pm2] = (levelBnous[pm1][pm2] or 0) + pm3
  2889 + end
  2890 + end
  2891 + end
  2892 + self:updateProperty({field = "levelBnous", value= levelBnous})
  2893 + return levelBnous
  2894 + end
  2895 +
2795 function Role:getPotionLevel(id) 2896 function Role:getPotionLevel(id)
2796 local level = self.dinerData:getProperty("dishTree"):getv(id, 1) 2897 local level = self.dinerData:getProperty("dishTree"):getv(id, 1)
2797 local talentSet = csvdb["diner_talentCsv"][id] 2898 local talentSet = csvdb["diner_talentCsv"][id]
@@ -2838,7 +2939,7 @@ function RolePlugin.bind(Role) @@ -2838,7 +2939,7 @@ function RolePlugin.bind(Role)
2838 count = count or 0 2939 count = count or 0
2839 local page = globalCsv.store_type[ItemType.Rune] 2940 local page = globalCsv.store_type[ItemType.Rune]
2840 local limit = self:getProperty("bagLimit")[page] 2941 local limit = self:getProperty("bagLimit")[page]
2841 - return self:getRuneBatCount() + count >= limit 2942 + return self:getRuneBatCount() + count > limit
2842 end 2943 end
2843 2944
2844 function Role:checkRuneFullyByReward(reward) 2945 function Role:checkRuneFullyByReward(reward)
@@ -2889,6 +2990,8 @@ function RolePlugin.bind(Role) @@ -2889,6 +2990,8 @@ function RolePlugin.bind(Role)
2889 self:sendMail(20, nil, tmpreward) 2990 self:sendMail(20, nil, tmpreward)
2890 end 2991 end
2891 end 2992 end
  2993 +
  2994 +
2892 end 2995 end
2893 2996
2894 return RolePlugin 2997 return RolePlugin
2895 \ No newline at end of file 2998 \ No newline at end of file