.
This commit is contained in:
1 parent
4baea89f89
commit
fd386ed202
32 files changed
+1128
-601
No files matched your search
@@ -47,6 +47,7 @@ interface InternalRecord {
|
||||
userId: string;
|
||||
summonerName: string;
|
||||
profileIconId: number;
|
||||
teamIndex: number;
|
||||
side: TeamSide;
|
||||
championId: number;
|
||||
championLevel: number;
|
||||
@@ -81,6 +82,7 @@ interface InternalGameDetail {
|
||||
gameDuration: number;
|
||||
winnerSide: TeamSide;
|
||||
teams: Array<{
|
||||
teamIndex: number;
|
||||
side: TeamSide;
|
||||
win: boolean;
|
||||
objectives: { baron: number; dragon: number; tower: number };
|
||||
@@ -237,12 +239,14 @@ export class CommunityStatsService {
|
||||
gameCreation: game.gameCreation,
|
||||
gameDuration: game.gameDuration,
|
||||
teams: game.teams.map((team) => ({
|
||||
teamIndex: team.teamIndex,
|
||||
side: team.side,
|
||||
win: team.win,
|
||||
objectives: team.objectives,
|
||||
participants: team.participants.map((record) => ({
|
||||
userId: record.userId,
|
||||
summonerName: record.summonerName,
|
||||
teamIndex: record.teamIndex,
|
||||
side: record.side,
|
||||
teamPosition: record.teamPosition,
|
||||
championId: record.championId,
|
||||
@@ -454,17 +458,19 @@ export class CommunityStatsService {
|
||||
scheduledAt: match.scheduledAt.toISOString(),
|
||||
status: match.status === 'finished' ? 'finished' : 'in-progress',
|
||||
gameCount: match.gameCount,
|
||||
blueScore: match.result?.blueScore ?? 0,
|
||||
redScore: match.result?.redScore ?? 0,
|
||||
winnerSide: match.result?.winnerSide,
|
||||
winnerTeamIndex: match.result?.winnerTeamIndex,
|
||||
seriesResults: match.result?.seriesResults ?? [],
|
||||
games: games.map((game) => ({
|
||||
gameNumber: game.gameNumber,
|
||||
riotMatchId: game.riotMatchId ?? null,
|
||||
blueTeamIndex: game.blueTeamIndex,
|
||||
redTeamIndex: game.redTeamIndex,
|
||||
winnerTeamIndex: game.winnerTeamIndex ?? null,
|
||||
winnerSide: game.winnerSide ?? null,
|
||||
gameDuration: game.gameDuration,
|
||||
})),
|
||||
teams: match.teams.map((team) => ({
|
||||
side: team.side,
|
||||
teamIndex: team.teamIndex,
|
||||
name: team.name,
|
||||
members: team.members.map((member) => {
|
||||
const participant = participantById.get(member.userId.toString());
|
||||
@@ -508,6 +514,8 @@ export class CommunityStatsService {
|
||||
gameDuration: game.gameDuration,
|
||||
winnerSide: game.winnerSide,
|
||||
teams: (['blue', 'red'] as TeamSide[]).map((side) => {
|
||||
const teamIndex =
|
||||
side === 'blue' ? game.blueTeamIndex : game.redTeamIndex;
|
||||
const rawTeamId = rawTeamIdBySide.get(side);
|
||||
const rawTeam = raw.info.teams.find((team) => team.teamId === rawTeamId);
|
||||
const teamRawParticipants = raw.info.participants.filter(
|
||||
@@ -522,6 +530,7 @@ export class CommunityStatsService {
|
||||
0,
|
||||
);
|
||||
return {
|
||||
teamIndex,
|
||||
side,
|
||||
win: game.winnerSide === side,
|
||||
objectives: {
|
||||
@@ -559,6 +568,7 @@ export class CommunityStatsService {
|
||||
gameDuration: game.gameDuration,
|
||||
winnerSide: game.winnerSide,
|
||||
teams: (['blue', 'red'] as TeamSide[]).map((side) => ({
|
||||
teamIndex: side === 'blue' ? game.blueTeamIndex : game.redTeamIndex,
|
||||
side,
|
||||
win: game.winnerSide === side,
|
||||
objectives: { baron: 0, dragon: 0, tower: 0 },
|
||||
@@ -621,6 +631,7 @@ export class CommunityStatsService {
|
||||
rawParticipant?.summonerName ??
|
||||
'Unknown',
|
||||
profileIconId: snapshot?.profileIconId ?? 0,
|
||||
teamIndex: participant.teamIndex,
|
||||
side: participant.side,
|
||||
championId: participant.championId,
|
||||
championLevel: rawParticipant?.champLevel ?? 0,
|
||||
|
||||
@@ -22,17 +22,25 @@ export interface InternalMatchCardView {
|
||||
scheduledAt: string;
|
||||
status: 'finished' | 'in-progress';
|
||||
gameCount: number;
|
||||
blueScore: number;
|
||||
redScore: number;
|
||||
winnerSide?: TeamSide;
|
||||
winnerTeamIndex?: number;
|
||||
seriesResults: Array<{
|
||||
teamAIndex: number;
|
||||
teamBIndex: number;
|
||||
teamAWins: number;
|
||||
teamBWins: number;
|
||||
winnerTeamIndex?: number;
|
||||
}>;
|
||||
games: Array<{
|
||||
gameNumber: number;
|
||||
riotMatchId: string | null;
|
||||
blueTeamIndex: number;
|
||||
redTeamIndex: number;
|
||||
winnerTeamIndex: number | null;
|
||||
winnerSide: TeamSide | null;
|
||||
gameDuration: number;
|
||||
}>;
|
||||
teams: Array<{
|
||||
side: TeamSide;
|
||||
teamIndex: number;
|
||||
name: string;
|
||||
members: Array<{
|
||||
userId: string;
|
||||
@@ -101,12 +109,14 @@ export interface InternalMatchDetailResponse {
|
||||
gameCreation: number;
|
||||
gameDuration: number;
|
||||
teams: Array<{
|
||||
teamIndex: number;
|
||||
side: TeamSide;
|
||||
win: boolean;
|
||||
objectives: { baron: number; dragon: number; tower: number };
|
||||
participants: Array<{
|
||||
userId: string | null;
|
||||
summonerName: string;
|
||||
teamIndex: number;
|
||||
side: TeamSide;
|
||||
teamPosition: string;
|
||||
championId: number;
|
||||
|
||||
Reference in new issue
Block a user