RBWCM-SDK Documentation - v1.1.0
    Preparing search index...

    Class DraftStateEntity

    Represents the live state of an ongoing matchmaking draft. Provides helper methods to process picks, map bans, and map votes directly.

    Index

    Constructors

    Properties

    availablePool: number[]
    bannedMaps: string[]
    captains: Record<number, number>
    currentMapBanIndex: number
    currentPickIndex: number
    finalMapId?: string
    gameId: number
    mapBanOrder: number[]
    mapPool: string[]
    mapSelectionMode: MapSelection
    mapVotes?: Record<string, number>
    phase: DraftPhase
    pickOrder: number[]
    playersCache: Record<number, DraftPlayerCache>
    playerVotes?: Record<number, string>
    queueId: string
    teams: Record<number, number[]>

    Methods

    • Processes a map ban for this draft.

      Parameters

      • mapId: string

        The ID of the map to ban.

      • captainId: number

        The ID of the captain making the ban.

      Returns Promise<{ message: string }>

      A promise resolving to a success message.

    • Processes a player pick for this draft.

      Parameters

      • pickedUserId: number

        The ID of the user being picked from the pool.

      • captainId: number

        The ID of the captain making the pick.

      Returns Promise<void>

      A promise resolving when the pick is successfully processed.

    • Processes a map vote for this draft.

      Parameters

      • mapId: string

        The ID of the map being voted for.

      • userId: number

        The ID of the user casting the vote.

      Returns Promise<{ message: string }>

      A promise resolving to a success message.