Change default slot to 0 (index out of range)

This commit is contained in:
memetrollsXD 2022-08-02 18:51:16 +02:00
parent d8397bdc97
commit 76f9578016
No known key found for this signature in database
GPG Key ID: 105C2F3417AC32CD

View File

@ -57,15 +57,12 @@ export default async function handle(session: Session, packet: Packet) {
planeId: 10001 planeId: 10001
} }
const LINEUPS = 6; const LINEUPS = 6;
let slot = 0;
plr.db.lineup = { plr.db.lineup = {
curIndex: 0, curIndex: 0,
lineups: {} lineups: {}
} }
for (let i = 0; i <= LINEUPS; i++) { for (let i = 0; i <= LINEUPS; i++) {
const copy = baseLineup; plr.db.lineup.lineups[i] = baseLineup;
copy.index = slot++;
plr.db.lineup.lineups[i] = copy;
} }
plr.save(); plr.save();
} }