Commit 8b6745bf9d3828a27519e35b25fd26ffdb8c7bc5
1 parent
3e80ee56
世界boss行动点奖励领完后重置
Showing
1 changed file
with
11 additions
and
0 deletions
Show diff stats
src/actions/ActivityAction.lua
| ... | ... | @@ -841,6 +841,7 @@ function _M.bossRewardRpc(agent, data) |
| 841 | 841 | local awardCfg = actCfg[index] |
| 842 | 842 | if not awardCfg then return 6 end |
| 843 | 843 | |
| 844 | + local totalAwardCnt = #actCfg | |
| 844 | 845 | local preList = awardCfg.condition1:toArray(true, "=") |
| 845 | 846 | |
| 846 | 847 | local actData = role.activity:getActData("ChallengeLevel") or {} |
| ... | ... | @@ -868,6 +869,16 @@ function _M.bossRewardRpc(agent, data) |
| 868 | 869 | if not ok then return 8 end |
| 869 | 870 | |
| 870 | 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 | |
| 871 | 882 | battleInfo["bossP"] = bossPoint - 1 |
| 872 | 883 | actData[id] = battleInfo |
| 873 | 884 | role.activity:updateActData("ChallengeLevel", actData) | ... | ... |