diff --git a/src/exporters/stat.ink.ts b/src/exporters/stat.ink.ts index daf4745..2a0cf7e 100644 --- a/src/exporters/stat.ink.ts +++ b/src/exporters/stat.ink.ts @@ -486,8 +486,9 @@ export class StatInkExporter implements GameExporter { splashtag_title: player.byname, uniform: SPLATNET3_STATINK_MAP.COOP_UNIFORM_MAP[b64Number(player.uniform.id)], - special: - SPLATNET3_STATINK_MAP.COOP_SPECIAL_MAP[b64Number(specialWeapon.id)], + special: specialWeapon + ? SPLATNET3_STATINK_MAP.COOP_SPECIAL_MAP[b64Number(specialWeapon.id)] + : undefined, weapons: await Promise.all(weapons.map((w) => this.mapCoopWeapon(w))), golden_eggs: goldenDeliverCount, golden_assist: goldenAssistCount, @@ -495,7 +496,7 @@ export class StatInkExporter implements GameExporter { rescue: rescueCount, rescued: rescuedCount, defeat_boss: defeatEnemyCount, - disconnected: "no", + disconnected: specialWeapon ? "no" : "yes", }; } mapKing(id?: string) { diff --git a/src/types.ts b/src/types.ts index 727b903..06faf21 100644 --- a/src/types.ts +++ b/src/types.ts @@ -210,7 +210,7 @@ export type CoopHistoryPlayerResult = { isMyself: boolean; }; weapons: { name: string }[]; - specialWeapon: { + specialWeapon: null | { name: string; id: string; }; @@ -446,7 +446,7 @@ export type StatInkCoopPlayer = { number: string; splashtag_title: string | null; uniform?: "orange" | "green" | "yellow" | "pink" | "blue" | "black" | "white"; - special: string; + special?: string; weapons: string[]; golden_eggs: number; golden_assist: number;