Commit 3e80ee5657c7aca3718e07b09e8c21f5247a5969
1 parent
4bd10b43
世界boss行动点bug
Showing
2 changed files
with
13 additions
and
5 deletions
Show diff stats
src/actions/ActivityAction.lua
| ... | ... | @@ -485,8 +485,16 @@ function _M.startBattleRpc(agent, data) |
| 485 | 485 | local bi = actData[id] |
| 486 | 486 | if not bi then return 8 end |
| 487 | 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 | 498 | end |
| 491 | 499 | num = num * count |
| 492 | 500 | end |
| ... | ... | @@ -513,7 +521,7 @@ function _M.startBattleRpc(agent, data) |
| 513 | 521 | return 7 |
| 514 | 522 | end |
| 515 | 523 | local bi = actData[id] |
| 516 | - local star = bi["star"] | |
| 524 | + local star = bi["star"] or 0 | |
| 517 | 525 | local award = battleCfg.item_clear:toNumMap() |
| 518 | 526 | if getStarCount(battleCfg, star) == 3 then |
| 519 | 527 | local aw = battleCfg.perfect_reward:toNumMap() |
| ... | ... | @@ -528,7 +536,7 @@ function _M.startBattleRpc(agent, data) |
| 528 | 536 | SendPacket(actionCodes.Activity_startBattleRpc, MsgPack.pack(role:packReward(reward, change))) |
| 529 | 537 | |
| 530 | 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 | 540 | end |
| 533 | 541 | |
| 534 | 542 | bi["sum"] = bi["sum"] + bi["top"] | ... | ... |