.
This commit is contained in:
1 parent
fedca82c81
commit
3607e3a99c
13 files changed
+1838
-793
No files matched your search
@@ -85,6 +85,7 @@ export interface MatchDetailView {
|
||||
}
|
||||
|
||||
export interface AuctionPlayerView extends ParticipantView {
|
||||
passCount: number;
|
||||
masteries: {
|
||||
championId: number;
|
||||
level: number;
|
||||
@@ -118,6 +119,8 @@ export interface AuctionStateView {
|
||||
currentPlayerIndex: number;
|
||||
totalPlayers: number;
|
||||
auctionOrder: AuctionPlayerView[];
|
||||
passedQueue: AuctionPlayerView[];
|
||||
auctionRound: number;
|
||||
bids: {
|
||||
teamIndex: number;
|
||||
amount: number;
|
||||
@@ -235,6 +238,7 @@ function mapAuctionPlayerToView(
|
||||
mainPosition,
|
||||
subPosition,
|
||||
profileIconId: player.profileIconId,
|
||||
passCount: player.passCount ?? 0,
|
||||
masteries: player.masteries.slice(0, 5).map((mastery) => ({
|
||||
championId: mastery.championId,
|
||||
level: mastery.championLevel,
|
||||
@@ -281,11 +285,13 @@ function mapAuctionTeamToView(
|
||||
(participant
|
||||
? {
|
||||
...participant,
|
||||
passCount: 0,
|
||||
masteries: [],
|
||||
recentStats: createEmptyRecentStatsView(),
|
||||
}
|
||||
: {
|
||||
...createFallbackParticipant(member.userId),
|
||||
passCount: 0,
|
||||
masteries: [],
|
||||
recentStats: createEmptyRecentStatsView(),
|
||||
});
|
||||
@@ -464,6 +470,7 @@ export function mapApiAuctionToAuctionState(
|
||||
.map((participant) => [participant.userId, participant]),
|
||||
);
|
||||
const auctionOrder = auction.order.map(mapAuctionPlayerToView);
|
||||
const passedQueue = (auction.passedQueue ?? []).map(mapAuctionPlayerToView);
|
||||
const auctionPlayerLookup = new Map(
|
||||
auctionOrder.map((player) => [player.userId, player]),
|
||||
);
|
||||
@@ -499,6 +506,8 @@ export function mapApiAuctionToAuctionState(
|
||||
currentPlayerIndex,
|
||||
totalPlayers,
|
||||
auctionOrder,
|
||||
passedQueue,
|
||||
auctionRound: auction.auctionRound ?? 1,
|
||||
bids: auction.bids.map((bid) => ({
|
||||
teamIndex: bid.teamIndex,
|
||||
amount: bid.amount,
|
||||
|
||||
Reference in new issue
Block a user