fix: specialWeapon null (#27)
parent
84752ea427
commit
c9bdf54110
|
|
@ -486,8 +486,9 @@ export class StatInkExporter implements GameExporter {
|
||||||
splashtag_title: player.byname,
|
splashtag_title: player.byname,
|
||||||
uniform:
|
uniform:
|
||||||
SPLATNET3_STATINK_MAP.COOP_UNIFORM_MAP[b64Number(player.uniform.id)],
|
SPLATNET3_STATINK_MAP.COOP_UNIFORM_MAP[b64Number(player.uniform.id)],
|
||||||
special:
|
special: specialWeapon
|
||||||
SPLATNET3_STATINK_MAP.COOP_SPECIAL_MAP[b64Number(specialWeapon.id)],
|
? SPLATNET3_STATINK_MAP.COOP_SPECIAL_MAP[b64Number(specialWeapon.id)]
|
||||||
|
: undefined,
|
||||||
weapons: await Promise.all(weapons.map((w) => this.mapCoopWeapon(w))),
|
weapons: await Promise.all(weapons.map((w) => this.mapCoopWeapon(w))),
|
||||||
golden_eggs: goldenDeliverCount,
|
golden_eggs: goldenDeliverCount,
|
||||||
golden_assist: goldenAssistCount,
|
golden_assist: goldenAssistCount,
|
||||||
|
|
@ -495,7 +496,7 @@ export class StatInkExporter implements GameExporter {
|
||||||
rescue: rescueCount,
|
rescue: rescueCount,
|
||||||
rescued: rescuedCount,
|
rescued: rescuedCount,
|
||||||
defeat_boss: defeatEnemyCount,
|
defeat_boss: defeatEnemyCount,
|
||||||
disconnected: "no",
|
disconnected: specialWeapon ? "no" : "yes",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
mapKing(id?: string) {
|
mapKing(id?: string) {
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,7 @@ export type CoopHistoryPlayerResult = {
|
||||||
isMyself: boolean;
|
isMyself: boolean;
|
||||||
};
|
};
|
||||||
weapons: { name: string }[];
|
weapons: { name: string }[];
|
||||||
specialWeapon: {
|
specialWeapon: null | {
|
||||||
name: string;
|
name: string;
|
||||||
id: string;
|
id: string;
|
||||||
};
|
};
|
||||||
|
|
@ -446,7 +446,7 @@ export type StatInkCoopPlayer = {
|
||||||
number: string;
|
number: string;
|
||||||
splashtag_title: string | null;
|
splashtag_title: string | null;
|
||||||
uniform?: "orange" | "green" | "yellow" | "pink" | "blue" | "black" | "white";
|
uniform?: "orange" | "green" | "yellow" | "pink" | "blue" | "black" | "white";
|
||||||
special: string;
|
special?: string;
|
||||||
weapons: string[];
|
weapons: string[];
|
||||||
golden_eggs: number;
|
golden_eggs: number;
|
||||||
golden_assist: number;
|
golden_assist: number;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue