import "steammessages.proto";
import "dota_shared_enums.proto";
import "dota_client_enums.proto";
import "base_gcmessages.proto";
import "dota_gcmessages_common_lobby.proto";

enum EStartFindingMatchResult {
	k_EStartFindingMatchResult_Invalid = 0;
	k_EStartFindingMatchResult_OK = 1;
	k_EStartFindingMatchResult_AlreadySearching = 2;
	k_EStartFindingMatchResult_FailGeneric = 100;
	k_EStartFindingMatchResult_FailedIgnore = 101;
	k_EStartFindingMatchResult_MatchmakingDisabled = 102;
	k_EStartFindingMatchResult_RegionOffline = 103;
	k_EStartFindingMatchResult_MatchmakingCooldown = 104;
	k_EStartFindingMatchResult_ClientOutOfDate = 105;
	k_EStartFindingMatchResult_CompetitiveNoLowPriority = 106;
	k_EStartFindingMatchResult_CompetitiveNotUnlocked = 107;
	k_EStartFindingMatchResult_GameModeNotUnlocked = 108;
	k_EStartFindingMatchResult_CompetitiveNotEnoughPlayTime = 109;
	k_EStartFindingMatchResult_MissingInitialSkill = 110;
	k_EStartFindingMatchResult_CompetitiveRankSpreadTooLarge = 111;
	k_EStartFindingMatchResult_MemberAlreadyInLobby = 112;
	k_EStartFindingMatchResult_MemberNotVACVerified = 113;
	k_EStartFindingMatchResult_WeekendTourneyBadPartySize = 114;
	k_EStartFindingMatchResult_WeekendTourneyTeamBuyInTooSmall = 115;
	k_EStartFindingMatchResult_WeekendTourneyIndividualBuyInTooLarge = 116;
	k_EStartFindingMatchResult_WeekendTourneyTeamBuyInTooLarge = 117;
	k_EStartFindingMatchResult_MemberMissingEventOwnership = 118;
	k_EStartFindingMatchResult_WeekendTourneyNotUnlocked = 119;
	k_EStartFindingMatchResult_WeekendTourneyRecentParticipation = 120;
	k_EStartFindingMatchResult_MemberMissingAnchoredPhoneNumber = 121;
	k_EStartFindingMatchResult_NotMemberOfClan = 122;
	k_EStartFindingMatchResult_CoachesChallengeBadPartySize = 123;
	k_EStartFindingMatchResult_CoachesChallengeRequirementsNotMet = 124;
	k_EStartFindingMatchResult_InvalidRoleSelections = 125;
	k_EStartFindingMatchResult_PhoneNumberDiscrepancy = 126;
	k_EStartFindingMatchResult_NoQueuePoints = 127;
	k_EStartFindingMatchResult_MemberMissingGauntletFlag = 128;
	k_EStartFindingMatchResult_MemberGauntletTooRecent = 129;
	k_EStartFindingMatchResult_DifficultyNotUnlocked = 130;
	k_EStartFindingMatchResult_CoachesNotAllowedInParty = 131;
	k_EStartFindingMatchResult_MatchmakingBusy = 132;
	k_EStartFindingMatchResult_SteamChinaBanned = 133;
	k_EStartFindingMatchResult_SteamChinaInvalidMixedParty = 134;
	k_EStartFindingMatchResult_RestrictedFromRanked = 135;
	k_EStartFindingMatchResult_RankPreventsParties = 136;
	k_EStartFindingMatchResult_RegisteredNameRequired = 137;
}

message CMsgStartFindingMatch {
	optional string key = 1;
	optional uint32 matchgroups = 2 [default = 4294967295];
	optional uint32 client_version = 3;
	optional uint32 game_modes = 4 [default = 4294967295];
	optional .MatchType match_type = 6 [default = MATCH_TYPE_CASUAL];
	optional uint32 matchlanguages = 7 [default = 4294967295];
	optional uint32 team_id = 8;
	optional .MatchLanguages game_language_enum = 10 [default = MATCH_LANGUAGE_INVALID];
	optional string game_language_name = 11;
	optional .CMsgClientPingData ping_data = 12;
	optional uint32 region_select_flags = 13;
	optional bool solo_queue = 14;
	optional uint32 steam_clan_account_id = 16;
	optional bool is_challenge_match = 17;
	optional uint32 lane_selection_flags = 18;
	optional bool high_priority_disabled = 19;
	optional bool disable_experimental_gameplay = 20;
	optional uint32 custom_game_difficulty_mask = 21;
	optional uint32 bot_difficulty_mask = 22;
	optional uint32 bot_script_index_mask = 23;
}

message CMsgStartFindingMatchResult {
	optional uint32 legacy_generic_eresult = 1 [default = 2];
	optional .EStartFindingMatchResult result = 2 [default = k_EStartFindingMatchResult_Invalid];
	optional string error_token = 3;
	optional string debug_message = 4;
	repeated fixed64 responsible_party_members = 5;
	optional uint32 result_metadata = 6;
}

message CMsgStopFindingMatch {
	optional bool accept_cooldown = 1;
}

message CMsgPartyBuilderOptions {
	optional uint32 additional_slots = 1;
	optional .MatchType match_type = 2 [default = MATCH_TYPE_CASUAL];
	optional uint32 matchgroups = 3;
	optional uint32 client_version = 4;
	optional .MatchLanguages language = 5 [default = MATCH_LANGUAGE_INVALID];
}

message CMsgReadyUp {
	optional .DOTALobbyReadyState state = 1 [default = DOTALobbyReadyState_UNDECLARED];
	optional fixed64 ready_up_key = 2;
	optional .CDOTAClientHardwareSpecs hardware_specs = 3;
}

message CMsgReadyUpStatus {
	optional fixed64 lobby_id = 1;
	repeated uint32 accepted_ids = 2;
	repeated uint32 declined_ids = 3;
	repeated uint32 accepted_indices = 4;
	repeated uint32 declined_indices = 5;
	optional .DOTALobbyReadyState local_ready_state = 6 [default = DOTALobbyReadyState_UNDECLARED];
}

message CMsgAbandonCurrentGame {
}

message CMsgLobbyScenarioSave {
	optional int32 version = 1;
	optional bytes data = 2;
}

message CMsgPracticeLobbySetDetails {
	message AbilityDraftSpecificDetails {
		optional bool shuffle_draft_order = 1;
	}

	optional uint64 lobby_id = 1;
	optional string game_name = 2;
	repeated .CLobbyTeamDetails team_details = 3;
	optional uint32 server_region = 4;
	optional uint32 game_mode = 5;
	optional .DOTA_CM_PICK cm_pick = 6 [default = DOTA_CM_RANDOM];
	optional .DOTABotDifficulty bot_difficulty_radiant = 9 [default = BOT_DIFFICULTY_PASSIVE];
	optional bool allow_cheats = 10;
	optional bool fill_with_bots = 11;
	optional bool allow_spectating = 13;
	optional string pass_key = 15;
	optional uint32 leagueid = 16;
	optional uint32 penalty_level_radiant = 17;
	optional uint32 penalty_level_dire = 18;
	optional uint32 series_type = 20;
	optional uint32 radiant_series_wins = 21;
	optional uint32 dire_series_wins = 22;
	optional bool allchat = 23 [default = false];
	optional .LobbyDotaTVDelay dota_tv_delay = 24 [default = LobbyDotaTV_120];
	optional bool lan = 25;
	optional string custom_game_mode = 26;
	optional string custom_map_name = 27;
	optional uint32 custom_difficulty = 28;
	optional uint64 custom_game_id = 29;
	optional uint32 custom_min_players = 30;
	optional uint32 custom_max_players = 31;
	optional .DOTALobbyVisibility visibility = 33 [default = DOTALobbyVisibility_Public];
	optional fixed64 custom_game_crc = 34;
	optional fixed32 custom_game_timestamp = 37;
	optional uint64 previous_match_override = 38;
	optional .LobbyDotaPauseSetting pause_setting = 42 [default = LobbyDotaPauseSetting_Unlimited];
	optional .DOTABotDifficulty bot_difficulty_dire = 43 [default = BOT_DIFFICULTY_PASSIVE];
	optional uint64 bot_radiant = 44;
	optional uint64 bot_dire = 45;
	optional .DOTASelectionPriorityRules selection_priority_rules = 46 [default = k_DOTASelectionPriorityRules_Manual];
	optional bool custom_game_penalties = 47;
	optional string lan_host_ping_location = 48;
	optional uint32 league_node_id = 49;
	repeated int32 requested_hero_ids = 50;
	optional .CMsgLobbyScenarioSave scenario_save = 51;
	optional .CMsgPracticeLobbySetDetails.AbilityDraftSpecificDetails ability_draft_specific_details = 52;
	optional bool do_player_draft = 53;
	repeated int32 requested_hero_teams = 54;
}

message CMsgPracticeLobbyCreate {
	optional string search_key = 1;
	optional string pass_key = 5;
	optional uint32 client_version = 6;
	optional .CMsgPracticeLobbySetDetails lobby_details = 7;
}

message CMsgPracticeLobbySetTeamSlot {
	optional .DOTA_GC_TEAM team = 1 [default = DOTA_GC_TEAM_GOOD_GUYS];
	optional uint32 slot = 2;
	optional .DOTABotDifficulty bot_difficulty = 3 [default = BOT_DIFFICULTY_PASSIVE];
}

message CMsgPracticeLobbySetCoach {
	optional .DOTA_GC_TEAM team = 1 [default = DOTA_GC_TEAM_GOOD_GUYS];
}

message CMsgPracticeLobbyJoinBroadcastChannel {
	optional uint32 channel = 1;
	optional string preferred_description = 2;
	optional string preferred_country_code = 3;
	optional string preferred_language_code = 4;
}

message CMsgPracticeLobbyCloseBroadcastChannel {
	optional uint32 channel = 1;
}

message CMsgPracticeLobbyToggleBroadcastChannelCameramanStatus {
}

message CMsgPracticeLobbyKick {
	optional uint32 account_id = 3;
}

message CMsgPracticeLobbyKickFromTeam {
	optional uint32 account_id = 1;
}

message CMsgPracticeLobbyLeave {
}

message CMsgPracticeLobbyLaunch {
	optional uint32 client_version = 5;
}

message CMsgApplyTeamToPracticeLobby {
	optional uint32 team_id = 1;
}

message CMsgPracticeLobbyList {
	optional string pass_key = 2;
	optional uint32 region = 3;
	optional .DOTA_GameMode game_mode = 4 [default = DOTA_GAMEMODE_NONE];
}

message CMsgPracticeLobbyListResponseEntry {
	message CLobbyMember {
		optional uint32 account_id = 1;
		optional string player_name = 2;
	}

	optional uint64 id = 1 [(key_field) = true];
	repeated .CMsgPracticeLobbyListResponseEntry.CLobbyMember members = 5;
	optional bool requires_pass_key = 6;
	optional uint32 leader_account_id = 7;
	optional string name = 10;
	optional string custom_game_mode = 11;
	optional .DOTA_GameMode game_mode = 12 [default = DOTA_GAMEMODE_NONE];
	optional bool friend_present = 13;
	optional uint32 players = 14;
	optional string custom_map_name = 15;
	optional uint32 max_player_count = 16;
	optional uint32 server_region = 17;
	optional uint32 league_id = 19;
	optional string lan_host_ping_location = 20;
	optional uint32 min_player_count = 21;
	optional bool penalties_enabled = 22;
}

message CMsgPracticeLobbyListResponse {
	repeated .CMsgPracticeLobbyListResponseEntry lobbies = 2;
}

message CMsgLobbyList {
	optional uint32 server_region = 1 [default = 0];
	optional .DOTA_GameMode game_mode = 2 [default = DOTA_GAMEMODE_NONE];
}

message CMsgLobbyListResponse {
	repeated .CMsgPracticeLobbyListResponseEntry lobbies = 1;
}

message CMsgPracticeLobbyJoin {
	optional uint64 lobby_id = 1;
	optional uint32 client_version = 2;
	optional string pass_key = 3;
	optional fixed64 custom_game_crc = 4;
	optional fixed32 custom_game_timestamp = 5;
}

message CMsgPracticeLobbyJoinResponse {
	optional .DOTAJoinLobbyResult result = 1 [default = DOTA_JOIN_RESULT_SUCCESS];
}

message CMsgFriendPracticeLobbyListRequest {
	repeated uint32 friends = 1;
}

message CMsgFriendPracticeLobbyListResponse {
	repeated .CMsgPracticeLobbyListResponseEntry lobbies = 1;
}

message CMsgJoinableCustomGameModesRequest {
	optional uint32 server_region = 1;
}

message CMsgJoinableCustomGameModesResponseEntry {
	optional uint64 custom_game_id = 1;
	optional uint32 lobby_count = 2;
	optional uint32 player_count = 3;
}

message CMsgJoinableCustomGameModesResponse {
	repeated .CMsgJoinableCustomGameModesResponseEntry game_modes = 1;
}

message CMsgJoinableCustomLobbiesRequest {
	optional uint32 server_region = 1;
	optional uint64 custom_game_id = 2;
}

message CMsgJoinableCustomLobbiesResponseEntry {
	optional fixed64 lobby_id = 1;
	optional uint64 custom_game_id = 2;
	optional string lobby_name = 3;
	optional uint32 member_count = 4;
	optional uint32 leader_account_id = 5;
	optional string leader_name = 6;
	optional string custom_map_name = 7;
	optional uint32 max_player_count = 8;
	optional uint32 server_region = 9;
	optional bool has_pass_key = 11;
	optional string lan_host_ping_location = 12;
	optional uint32 lobby_creation_time = 13;
	optional uint32 custom_game_timestamp = 14;
	optional uint64 custom_game_crc = 15;
	optional uint32 min_player_count = 16;
	optional bool penalties_enabled = 17;
}

message CMsgJoinableCustomLobbiesResponse {
	repeated .CMsgJoinableCustomLobbiesResponseEntry lobbies = 1;
}

message CMsgQuickJoinCustomLobby {
	message LegacyRegionPing {
		optional uint32 server_region = 1;
		optional uint32 ping = 2;
		optional fixed32 region_code = 3;
	}

	optional uint32 legacy_server_region = 1;
	optional uint64 custom_game_id = 2;
	optional uint32 client_version = 3;
	optional .CMsgPracticeLobbySetDetails create_lobby_details = 4;
	optional bool allow_any_map = 5;
	repeated .CMsgQuickJoinCustomLobby.LegacyRegionPing legacy_region_pings = 6;
	optional .CMsgClientPingData ping_data = 7;
}

message CMsgQuickJoinCustomLobbyResponse {
	optional .DOTAJoinLobbyResult result = 1 [default = DOTA_JOIN_RESULT_SUCCESS];
}

message CMsgBotGameCreate {
	optional string search_key = 1;
	optional uint32 client_version = 2;
	optional .DOTABotDifficulty difficulty_radiant = 3 [default = BOT_DIFFICULTY_PASSIVE];
	optional .DOTA_GC_TEAM team = 4 [default = DOTA_GC_TEAM_GOOD_GUYS];
	optional uint32 game_mode = 5;
	optional .DOTABotDifficulty difficulty_dire = 6 [default = BOT_DIFFICULTY_PASSIVE];
}

message CMsgDOTAPartyMemberSetCoach {
	optional bool wants_coach = 1;
}

message CMsgDOTASetGroupLeader {
	optional fixed64 new_leader_steamid = 1;
}

message CMsgDOTACancelGroupInvites {
	repeated fixed64 invited_steamids = 1;
	repeated fixed64 invited_groupids = 2;
}

message CMsgDOTASetGroupOpenStatus {
	optional bool open = 1;
}

message CMsgDOTAGroupMergeInvite {
	optional fixed64 other_group_id = 1;
}

message CMsgDOTAGroupMergeResponse {
	optional fixed64 initiator_group_id = 1;
	optional bool accept = 2;
}

message CMsgDOTAGroupMergeReply {
	optional .EDOTAGroupMergeResult result = 1 [default = k_EDOTAGroupMergeResult_OK];
}

message CMsgSpectatorLobbyGameDetails {
	message Team {
		optional uint32 team_id = 1;
		optional string team_name = 2;
		optional fixed64 team_logo = 3;
	}

	optional uint32 language = 1;
	optional uint64 match_id = 2;
	optional fixed64 server_steam_id = 3;
	optional string stream_url = 4;
	optional string stream_name = 5;
	optional uint32 league_id = 6;
	optional uint32 series_type = 7;
	optional uint32 series_game = 8;
	optional .CMsgSpectatorLobbyGameDetails.Team radiant_team = 9;
	optional .CMsgSpectatorLobbyGameDetails.Team dire_team = 10;
}

message CMsgSetSpectatorLobbyDetails {
	optional uint64 lobby_id = 1;
	optional string lobby_name = 2;
	optional string pass_key = 3;
	optional .CMsgSpectatorLobbyGameDetails game_details = 4;
}

message CMsgCreateSpectatorLobby {
	optional uint32 client_version = 1;
	optional .CMsgSetSpectatorLobbyDetails details = 2;
}

message CMsgSpectatorLobbyList {
}

message CMsgSpectatorLobbyListResponse {
	message SpectatorLobby {
		optional uint64 lobby_id = 1;
		optional string game_name = 2;
		optional bool requires_pass_key = 3;
		optional uint32 leader_account_id = 4;
		optional uint32 member_count = 5;
		optional .CMsgSpectatorLobbyGameDetails game_details = 7;
	}

	repeated .CMsgSpectatorLobbyListResponse.SpectatorLobby lobbies = 1;
}

message CMsgClientToGCRequestSteamDatagramTicket {
	optional fixed64 server_steam_id = 1;
}

message CMsgClientToGCRequestSteamDatagramTicketResponse {
	optional bytes serialized_ticket = 1;
	optional string message = 2;
}

message CMsgGCToClientSteamDatagramTicket {
	optional fixed32 legacy_time_expiry = 1;
	optional fixed64 legacy_authorized_steam_id = 2;
	optional fixed32 legacy_authorized_public_ip = 3;
	optional fixed64 legacy_gameserver_steam_id = 4;
	optional fixed64 legacy_gameserver_net_id = 5;
	optional bytes legacy_signature = 6;
	optional uint32 legacy_app_id = 7;
	repeated bytes legacy_extra_fields = 8;
	optional bytes serialized_ticket = 16;
}

message CMsgGCToClientRequestLaneSelection {
}

message CMsgGCToClientRequestLaneSelectionResponse {
	optional uint32 lane_selection_flags = 1;
	optional bool high_priority_disabled = 2;
}

message CMsgGCToClientRequestMMInfo {
}

message CMsgClientToGCMMInfo {
	optional uint32 lane_selection_flags = 1;
	optional bool high_priority_disabled = 2;
}
