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,6 +841,7 @@ function _M.bossRewardRpc(agent, data) | ||
841 | local awardCfg = actCfg[index] | 841 | local awardCfg = actCfg[index] |
842 | if not awardCfg then return 6 end | 842 | if not awardCfg then return 6 end |
843 | 843 | ||
844 | + local totalAwardCnt = #actCfg | ||
844 | local preList = awardCfg.condition1:toArray(true, "=") | 845 | local preList = awardCfg.condition1:toArray(true, "=") |
845 | 846 | ||
846 | local actData = role.activity:getActData("ChallengeLevel") or {} | 847 | local actData = role.activity:getActData("ChallengeLevel") or {} |
@@ -868,6 +869,16 @@ function _M.bossRewardRpc(agent, data) | @@ -868,6 +869,16 @@ function _M.bossRewardRpc(agent, data) | ||
868 | if not ok then return 8 end | 869 | if not ok then return 8 end |
869 | 870 | ||
870 | 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 | ||
871 | battleInfo["bossP"] = bossPoint - 1 | 882 | battleInfo["bossP"] = bossPoint - 1 |
872 | actData[id] = battleInfo | 883 | actData[id] = battleInfo |
873 | role.activity:updateActData("ChallengeLevel", actData) | 884 | role.activity:updateActData("ChallengeLevel", actData) |