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,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"] |