🐞 fix(优化): 羁绊溢出替换道具
This commit is contained in:
@@ -422,12 +422,16 @@ export function getConnectMaxLv(actorId: number, shipId: number) {
|
||||
*/
|
||||
export function getConnectLvByExp(actorId: number, shipId: number, newExp: number) {
|
||||
let exps = gameData.friendShips.get(`${actorId}_${shipId}`) || [];
|
||||
let overExp = 0;
|
||||
exps.sort((a, b) => a.level - b.level);
|
||||
let newLv = 0;
|
||||
for (let { level, shipExp } of exps) {
|
||||
if (newExp >= shipExp) newLv = level;
|
||||
if (newExp >= shipExp) {
|
||||
newLv = level;
|
||||
overExp = newExp - shipExp;
|
||||
}
|
||||
}
|
||||
return newLv
|
||||
return { newLv, overExp }
|
||||
}
|
||||
|
||||
export function getBossHpByWarId(warId: number) {
|
||||
|
||||
Reference in New Issue
Block a user