🐞 fix(gvg): 激战期保存队伍修复

This commit is contained in:
luying
2023-02-18 17:30:03 +08:00
parent f6ab7b5154
commit cbbacd27b5
2 changed files with 6 additions and 4 deletions
+4 -3
View File
@@ -1454,9 +1454,10 @@ export function checkRouteParam(route: string, msg: any) {
case "guild.gvgBattleHandler.saveTeam": case "guild.gvgBattleHandler.saveTeam":
{ {
if(!checkNaturalNumbers(msg.index, msg.head, msg.frame, msg.spine)) return false; if(!checkNaturalNumbers(msg.index, msg.head, msg.frame, msg.spine)) return false;
if(!checkArrayCanEmpty(msg.lineup)) return false; if(msg.lineup) {
for(let { actorId, dataId, order } of msg.lineup) { for(let { actorId, dataId, order } of msg.lineup) {
if(!checkNaturalNumbers(actorId, dataId, order)) return false; if(!checkNaturalNumbers(actorId, dataId, order)) return false;
}
} }
break; break;
} }
+2 -1
View File
@@ -715,7 +715,8 @@ export class MyTeamSimpleInfo {
this.teamCode = team.teamCode; this.teamCode = team.teamCode;
this.index = team.index; this.index = team.index;
this.head = team.head; this.head = team.head;
this.frame = team.spine; this.frame = team.frame;
this.spine = team.spine;
this.lineup = team.lineup.map(({ actorId, dataId, outIndex }) => ({ actorId, dataId, order: outIndex })); this.lineup = team.lineup.map(({ actorId, dataId, outIndex }) => ({ actorId, dataId, order: outIndex }));
} }
} }