Commit 5cfb6dadadd7108f4f44a0cbccf4f0ccea9d24b9
Merge branch 'tr/bugfix' into tr/publish/release
* tr/bugfix: 铭文升级超过上限bug 世界boss行动点奖励领完后重置 世界boss行动点bug 拾荒失败也要触发成就引导 # Conflicts: # src/csvdata
Showing
3 changed files
with
29 additions
and
10 deletions
Show diff stats
src/actions/ActivityAction.lua
@@ -485,8 +485,16 @@ function _M.startBattleRpc(agent, data) | @@ -485,8 +485,16 @@ function _M.startBattleRpc(agent, data) | ||
485 | local bi = actData[id] | 485 | local bi = actData[id] |
486 | if not bi then return 8 end | 486 | if not bi then return 8 end |
487 | local star = bi["star"] or 0 | 487 | local star = bi["star"] or 0 |
488 | - if star < 1 then | ||
489 | - return 9 | 488 | + local maxP = bi["maxP"] or 0 |
489 | + -- 世界boss | ||
490 | + if battleCfg.worldBoss_award ~= 0 then | ||
491 | + if maxP < 1 then | ||
492 | + return 9 | ||
493 | + end | ||
494 | + else | ||
495 | + if star < 1 then | ||
496 | + return 9 | ||
497 | + end | ||
490 | end | 498 | end |
491 | num = num * count | 499 | num = num * count |
492 | end | 500 | end |
@@ -513,7 +521,7 @@ function _M.startBattleRpc(agent, data) | @@ -513,7 +521,7 @@ function _M.startBattleRpc(agent, data) | ||
513 | return 7 | 521 | return 7 |
514 | end | 522 | end |
515 | local bi = actData[id] | 523 | local bi = actData[id] |
516 | - local star = bi["star"] | 524 | + local star = bi["star"] or 0 |
517 | local award = battleCfg.item_clear:toNumMap() | 525 | local award = battleCfg.item_clear:toNumMap() |
518 | if getStarCount(battleCfg, star) == 3 then | 526 | if getStarCount(battleCfg, star) == 3 then |
519 | local aw = battleCfg.perfect_reward:toNumMap() | 527 | local aw = battleCfg.perfect_reward:toNumMap() |
@@ -528,7 +536,7 @@ function _M.startBattleRpc(agent, data) | @@ -528,7 +536,7 @@ function _M.startBattleRpc(agent, data) | ||
528 | SendPacket(actionCodes.Activity_startBattleRpc, MsgPack.pack(role:packReward(reward, change))) | 536 | SendPacket(actionCodes.Activity_startBattleRpc, MsgPack.pack(role:packReward(reward, change))) |
529 | 537 | ||
530 | if battleCfg.worldBoss_award ~= 0 and (bi["maxP"] or 0) > 0 then | 538 | if battleCfg.worldBoss_award ~= 0 and (bi["maxP"] or 0) > 0 then |
531 | - bi["bossP"] = (bi["bossP"] or 0) + bi["maxP"] | 539 | + bi["bossP"] = (bi["bossP"] or 0) + bi["maxP"] * count |
532 | end | 540 | end |
533 | 541 | ||
534 | bi["sum"] = bi["sum"] + bi["top"] | 542 | bi["sum"] = bi["sum"] + bi["top"] |
@@ -833,6 +841,7 @@ function _M.bossRewardRpc(agent, data) | @@ -833,6 +841,7 @@ function _M.bossRewardRpc(agent, data) | ||
833 | local awardCfg = actCfg[index] | 841 | local awardCfg = actCfg[index] |
834 | if not awardCfg then return 6 end | 842 | if not awardCfg then return 6 end |
835 | 843 | ||
844 | + local totalAwardCnt = #actCfg | ||
836 | local preList = awardCfg.condition1:toArray(true, "=") | 845 | local preList = awardCfg.condition1:toArray(true, "=") |
837 | 846 | ||
838 | local actData = role.activity:getActData("ChallengeLevel") or {} | 847 | local actData = role.activity:getActData("ChallengeLevel") or {} |
@@ -860,6 +869,16 @@ function _M.bossRewardRpc(agent, data) | @@ -860,6 +869,16 @@ function _M.bossRewardRpc(agent, data) | ||
860 | if not ok then return 8 end | 869 | if not ok then return 8 end |
861 | 870 | ||
862 | battleInfo["bossR"] = string.setbit(bossRecord, index) | 871 | battleInfo["bossR"] = string.setbit(bossRecord, index) |
872 | + local allFinish = true | ||
873 | + for i = 1, totalAwardCnt do | ||
874 | + if string.char(string.getbit(battleInfo["bossR"], i)) == "0" then | ||
875 | + allFinish = false | ||
876 | + break | ||
877 | + end | ||
878 | + end | ||
879 | + if allFinish then | ||
880 | + battleInfo["bossR"] = "" | ||
881 | + end | ||
863 | battleInfo["bossP"] = bossPoint - 1 | 882 | battleInfo["bossP"] = bossPoint - 1 |
864 | actData[id] = battleInfo | 883 | actData[id] = battleInfo |
865 | role.activity:updateActData("ChallengeLevel", actData) | 884 | role.activity:updateActData("ChallengeLevel", actData) |
src/actions/CarAction.lua
@@ -129,8 +129,8 @@ function _M.runeUpRpc( agent, data ) | @@ -129,8 +129,8 @@ function _M.runeUpRpc( agent, data ) | ||
129 | local runeData = runeSet[id] | 129 | local runeData = runeSet[id] |
130 | if not runeData then return 5 end | 130 | if not runeData then return 5 end |
131 | 131 | ||
132 | - local maxLv = #csvdb["rune_buildCsv"] | ||
133 | - if level >= maxLv then return 6 end | 132 | + --local maxLv = #csvdb["rune_buildCsv"] |
133 | + if level >= runeData.lvLimit then return 6 end | ||
134 | local lvData = csvdb["rune_buildCsv"][level] | 134 | local lvData = csvdb["rune_buildCsv"][level] |
135 | local cost = lvData.cost:toNumMap() | 135 | local cost = lvData.cost:toNumMap() |
136 | if not role:checkItemEnough(cost) then | 136 | if not role:checkItemEnough(cost) then |
src/adv/Adv.lua
@@ -829,10 +829,10 @@ function Adv:over(success, rewardRatio, overType) | @@ -829,10 +829,10 @@ function Adv:over(success, rewardRatio, overType) | ||
829 | red:hset(RANK_ADV_INFO, roleId, MsgPack.pack(curInfo)) | 829 | red:hset(RANK_ADV_INFO, roleId, MsgPack.pack(curInfo)) |
830 | end) | 830 | end) |
831 | end | 831 | end |
832 | - -- 通关的时候要把引导步骤设定到成就引导 | ||
833 | - if not self.owner:checkOverGuide(57) then | ||
834 | - self.owner:saveGuide(57,1,true) | ||
835 | - end | 832 | + end |
833 | + -- 通关的时候要把引导步骤设定到成就引导 | ||
834 | + if not self.owner:checkOverGuide(57) then | ||
835 | + self.owner:saveGuide(57,1,true) | ||
836 | end | 836 | end |
837 | self:clearAdvUnlockCache() | 837 | self:clearAdvUnlockCache() |
838 | 838 |