Commit 34d9f1925b6ca2e3cc41029099c50d7d72790764
1 parent
54a82e42
世界boss 胜利才扣门票,扫荡根据之前的最大值给行动点
Showing
2 changed files
with
7 additions
and
2 deletions
Show diff stats
src/actions/ActivityAction.lua
... | ... | @@ -525,6 +525,10 @@ function _M.startBattleRpc(agent, data) |
525 | 525 | local reward, change = role:award(award, {log = {desc = "actBattle", int1 = actid, int2 = count or 0}}) |
526 | 526 | SendPacket(actionCodes.Activity_startBattleRpc, MsgPack.pack(role:packReward(reward, change))) |
527 | 527 | |
528 | + if battleCfg.worldBoss_award ~= 0 and (bi["maxP"] or 0) > 0 then | |
529 | + bi["bossP"] = (bi["bossP"] or 0) + bi["maxP"] | |
530 | + end | |
531 | + | |
528 | 532 | bi["sum"] = bi["sum"] + bi["top"] |
529 | 533 | actData["ticket"] = ticket - num |
530 | 534 | actData[id] = bi |
... | ... | @@ -656,7 +660,7 @@ function _M.endBattleRpc(agent, data) |
656 | 660 | battleInfo["star"] = curStar |
657 | 661 | end |
658 | 662 | |
659 | - if battleCfg.rank ~= 0 then | |
663 | + if battleCfg.rank ~= 0 and isWin then | |
660 | 664 | -- 消耗门票 |
661 | 665 | role.activity:getBattleTicket(actid) |
662 | 666 | local num = battleCfg.type:toArray(true, "=")[3] |
... | ... | @@ -703,6 +707,7 @@ function _M.endBattleRpc(agent, data) |
703 | 707 | |
704 | 708 | if battleCfg.worldBoss_award ~= 0 and msg.point then |
705 | 709 | battleInfo["bossP"] = (battleInfo["bossP"] or 0) + msg.point |
710 | + battleInfo["maxP"] = math.max(msg.point, (battleInfo["maxP"] or 0)) | |
706 | 711 | end |
707 | 712 | actData[id] = battleInfo |
708 | 713 | role.activity:updateActData("ChallengeLevel", actData) | ... | ... |