import "steammessages.proto";
import "dota_shared_enums.proto";
import "gcsdk_gcmessages.proto";

enum ELobbyMemberCoachRequestState {
	k_eLobbyMemberCoachRequestState_None = 0;
	k_eLobbyMemberCoachRequestState_Accepted = 1;
	k_eLobbyMemberCoachRequestState_Rejected = 2;
}

enum LobbyDotaTVDelay {
	LobbyDotaTV_10 = 0;
	LobbyDotaTV_120 = 1;
	LobbyDotaTV_300 = 2;
	LobbyDotaTV_900 = 3;
}

enum LobbyDotaPauseSetting {
	LobbyDotaPauseSetting_Unlimited = 0;
	LobbyDotaPauseSetting_Limited = 1;
	LobbyDotaPauseSetting_Disabled = 2;
}

message CMsgLobbyCoachFriendRequest {
	optional uint32 coach_account_id = 1;
	optional uint32 player_account_id = 2;
	optional .ELobbyMemberCoachRequestState request_state = 3 [default = k_eLobbyMemberCoachRequestState_None];
}

message CMsgLobbyPlayerPlusSubscriptionData {
	message HeroBadge {
		optional int32 hero_id = 1;
		optional uint32 hero_badge_xp = 2;
	}

	repeated .CMsgLobbyPlayerPlusSubscriptionData.HeroBadge hero_badges = 1;
}

message CMsgEventActionData {
	optional uint32 action_id = 1;
	optional uint32 action_score = 2;
}

message CMsgPeriodicResourceData {
	optional uint32 periodic_resource_id = 1;
	optional uint32 remaining = 2;
	optional uint32 max = 3;
}

message CMsgLobbyEventPoints {
	message AccountPoints {
		optional uint32 account_id = 1;
		optional uint32 normal_points = 2;
		optional uint32 premium_points = 3;
		optional bool owned = 4;
		optional uint32 event_level = 7;
		optional uint64 active_effects_mask = 12;
		optional uint32 wager_streak = 23;
		repeated .CMsgEventActionData event_game_custom_actions = 25;
		optional uint32 tip_amount_index = 26;
		optional uint32 active_event_season_id = 27;
		optional uint32 teleport_fx_level = 28;
		repeated .CMsgEventActionData networked_event_actions = 30;
		repeated .CMsgPeriodicResourceData periodic_resources = 31;
		repeated .CExtraMsgBlock extra_event_messages = 32;
	}

	optional uint32 event_id = 1;
	repeated .CMsgLobbyEventPoints.AccountPoints account_points = 2;
}

message CMsgLobbyEventGameData {
	optional uint32 game_seed = 1;
	optional uint32 event_window_start_time = 2;
}

message CSODOTALobbyInvite {
	message LobbyMember {
		optional string name = 1;
		optional fixed64 steam_id = 2;
	}

	optional uint64 group_id = 1 [(key_field) = true];
	optional fixed64 sender_id = 2;
	optional string sender_name = 3;
	repeated .CSODOTALobbyInvite.LobbyMember members = 4;
	optional uint64 custom_game_id = 5;
	optional fixed64 invite_gid = 6;
	optional fixed64 custom_game_crc = 7;
	optional fixed32 custom_game_timestamp = 8;
}

message CSODOTALobbyMember {
	optional fixed64 id = 1 [(key_field) = true];
	optional int32 hero_id = 2;
	optional .DOTA_GC_TEAM team = 3 [default = DOTA_GC_TEAM_GOOD_GUYS];
	optional uint32 slot = 7;
	optional .DOTALeaverStatus_t leaver_status = 16 [default = DOTA_LEAVER_NONE];
	optional uint32 leaver_actions = 28;
	optional .DOTA_GC_TEAM coach_team = 23 [default = DOTA_GC_TEAM_NOTEAM];
	repeated uint32 custom_game_product_ids = 31;
	optional .DOTA_GC_TEAM live_spectator_team = 40 [default = DOTA_GC_TEAM_NOTEAM];
	repeated .CMsgPendingEventAward pending_awards = 44;
	repeated .CMsgPendingEventAward pending_awards_on_victory = 45;
	optional uint32 reports_available = 52;
	optional uint32 live_spectator_account_id = 55;
	optional uint32 comms_reports_available = 56;
}

message CSODOTAServerLobbyMember {
}

message CSODOTAStaticLobbyMember {
	optional string name = 1;
	optional uint64 party_id = 2;
	optional uint32 channel = 3 [default = 6];
	optional bool cameraman = 4;
}

message CSODOTAServerStaticLobbyMember {
	optional fixed64 steam_id = 1;
	optional int32 rank_tier = 3;
	optional int32 leaderboard_rank = 4 [default = -1];
	optional int32 lane_selection_flags = 5;
	optional .EDOTAMMRBoostType rank_mmr_boost_type = 6 [default = k_EDOTAMMRBoostType_None];
	optional int32 coach_rating = 7;
	repeated uint32 coached_account_ids = 8;
	optional bool was_mvp_last_game = 9;
	optional bool can_earn_rewards = 10;
	optional bool is_plus_subscriber = 11;
	optional uint64 favorite_team_packed = 12;
	optional bool is_steam_china = 13;
	optional uint32 title = 14;
	optional uint32 guild_id = 15;
	repeated fixed32 disabled_random_hero_bits = 16;
	repeated int32 disabled_hero_id = 17;
	repeated int32 enabled_hero_id = 18;
	repeated int32 banned_hero_ids = 19;
}

message CLobbyTeamDetails {
	optional string team_name = 1;
	optional string team_tag = 3;
	optional uint32 team_id = 4;
	optional uint64 team_logo = 5;
	optional uint64 team_base_logo = 6;
	optional uint64 team_banner_logo = 7;
	optional bool team_complete = 8;
	optional uint32 rank = 15;
	optional sint32 rank_change = 16;
	optional bool is_home_team = 17;
	optional bool is_challenge_match = 18;
	optional uint64 challenge_match_token_account = 19;
	optional string team_logo_url = 20;
	optional string team_abbreviation = 21;
}

message CLobbyGuildDetails {
	optional uint32 guild_id = 1;
	optional uint32 guild_primary_color = 2;
	optional uint32 guild_secondary_color = 3;
	optional uint32 guild_pattern = 4;
	optional uint64 guild_logo = 5;
	optional uint32 guild_points = 6;
	optional uint32 guild_event = 7;
	optional uint32 guild_flags = 8;
	optional .DOTA_GC_TEAM team_for_guild = 9 [default = DOTA_GC_TEAM_GOOD_GUYS];
	optional string guild_tag = 10;
	optional uint32 guild_weekly_percentile = 11;
}

message CLobbyTimedRewardDetails {
	optional uint32 item_def_index = 2;
	optional bool is_supply_crate = 3;
	optional bool is_timed_drop = 4;
	optional uint32 account_id = 5;
	optional uint32 origin = 6;
}

message CLobbyBroadcastChannelInfo {
	optional uint32 channel_id = 1;
	optional string country_code = 2;
	optional string description = 3;
	optional string language_code = 4;
}

message CLobbyGuildChallenge {
	optional uint32 guild_id = 1;
	optional .EEvent event_id = 2 [default = EVENT_ID_NONE];
	optional uint32 challenge_instance_id = 3;
	optional uint32 challenge_parameter = 4;
	optional uint32 challenge_timestamp = 5;
	optional uint32 challenge_period_serial = 6;
	optional uint32 challenge_progress_at_start = 7;
	repeated uint32 eligible_account_ids = 8;
}

message CDOTALobbyMatchQualityData {
	optional uint32 overall_quality = 1;
	optional uint32 team_balance = 2;
	optional uint32 match_skill_range = 3;
	optional uint32 match_behavior = 4;
}

message CSODOTALobby {
	message CExtraMsg {
		optional uint32 id = 1;
		optional bytes contents = 2;
	}

	enum State {
		UI = 0;
		READYUP = 4;
		SERVERSETUP = 1;
		RUN = 2;
		POSTGAME = 3;
		NOTREADY = 5;
		SERVERASSIGN = 6;
	}

	enum LobbyType {
		INVALID = -1;
		CASUAL_MATCH = 0;
		PRACTICE = 1;
		COOP_BOT_MATCH = 4;
		COMPETITIVE_MATCH = 7;
		WEEKEND_TOURNEY = 9;
		LOCAL_BOT_MATCH = 10;
		SPECTATOR = 11;
		EVENT_MATCH = 12;
		NEW_PLAYER_POOL = 14;
		FEATURED_GAMEMODE = 15;
		AUTOMATED_BOT_ONLY_MATCH = 16;
	}

	optional uint64 lobby_id = 1 [(key_field) = true];
	repeated .CSODOTALobbyMember all_members = 120;
	repeated uint32 member_indices = 121;
	repeated uint32 left_member_indices = 122;
	repeated uint32 free_member_indices = 123;
	optional fixed64 leader_id = 11;
	optional fixed64 server_id = 6 [default = 0];
	optional uint32 game_mode = 3;
	repeated fixed64 pending_invites = 10;
	optional .CSODOTALobby.State state = 4 [default = UI];
	optional string connect = 5;
	optional .CSODOTALobby.LobbyType lobby_type = 12 [default = INVALID];
	optional bool allow_cheats = 13;
	optional bool fill_with_bots = 14;
	optional string game_name = 16;
	repeated .CLobbyTeamDetails team_details = 17;
	optional uint32 tournament_id = 19;
	optional uint32 tournament_game_id = 20;
	optional uint32 server_region = 21 [default = 0];
	optional .DOTA_GameState game_state = 22 [default = DOTA_GAMERULES_STATE_INIT];
	optional uint32 num_spectators = 23;
	optional uint32 matchgroup = 25;
	optional .DOTA_CM_PICK cm_pick = 28 [default = DOTA_CM_RANDOM];
	optional uint64 match_id = 30;
	optional bool allow_spectating = 31 [default = true];
	optional .DOTABotDifficulty bot_difficulty_radiant = 36 [default = BOT_DIFFICULTY_HARD];
	optional string pass_key = 39;
	optional uint32 leagueid = 42;
	optional uint32 penalty_level_radiant = 43 [default = 0];
	optional uint32 penalty_level_dire = 44 [default = 0];
	optional uint32 series_type = 46;
	optional uint32 radiant_series_wins = 47;
	optional uint32 dire_series_wins = 48;
	optional bool allchat = 51 [default = false];
	optional .LobbyDotaTVDelay dota_tv_delay = 53 [default = LobbyDotaTV_10];
	optional string custom_game_mode = 54;
	optional string custom_map_name = 55;
	optional uint32 custom_difficulty = 56;
	optional bool lan = 57;
	repeated .CLobbyBroadcastChannelInfo broadcast_channel_info = 58;
	optional uint32 first_leaver_accountid = 59;
	optional uint32 series_id = 60;
	optional bool low_priority = 61;
	repeated .CSODOTALobby.CExtraMsg extra_messages = 62;
	optional bool first_blood_happened = 65;
	optional .EMatchOutcome match_outcome = 70 [default = k_EMatchOutcome_Unknown];
	optional bool mass_disconnect = 67;
	optional uint64 custom_game_id = 68;
	optional uint32 custom_min_players = 71;
	optional uint32 custom_max_players = 72;
	optional .DOTALobbyVisibility visibility = 75 [default = DOTALobbyVisibility_Public];
	optional fixed64 custom_game_crc = 76;
	optional bool custom_game_auto_created_lobby = 77;
	optional fixed32 custom_game_timestamp = 80;
	repeated uint64 previous_series_matches = 81;
	optional uint64 previous_match_override = 82;
	optional uint32 game_start_time = 87;
	optional .LobbyDotaPauseSetting pause_setting = 88 [default = LobbyDotaPauseSetting_Unlimited];
	optional uint32 weekend_tourney_division_id = 90;
	optional uint32 weekend_tourney_skill_level = 91;
	optional uint32 weekend_tourney_bracket_round = 92;
	optional .DOTABotDifficulty bot_difficulty_dire = 93 [default = BOT_DIFFICULTY_HARD];
	optional uint64 bot_radiant = 94;
	optional uint64 bot_dire = 95;
	repeated .EEvent event_progression_enabled = 96;
	optional .DOTASelectionPriorityRules selection_priority_rules = 97 [default = k_DOTASelectionPriorityRules_Manual];
	optional uint32 series_previous_selection_priority_team_id = 98;
	optional uint32 series_current_selection_priority_team_id = 99;
	optional .DOTASelectionPriorityChoice series_current_priority_team_choice = 100 [default = k_DOTASelectionPriorityChoice_Invalid];
	optional .DOTASelectionPriorityChoice series_current_non_priority_team_choice = 101 [default = k_DOTASelectionPriorityChoice_Invalid];
	optional bool series_current_selection_priority_used_coin_toss = 102;
	optional .EEvent current_primary_event = 103 [default = EVENT_ID_NONE];
	optional .EEvent current_primary_event_for_display = 104 [default = EVENT_ID_NONE];
	repeated int32 emergency_disabled_hero_ids = 105;
	optional fixed64 custom_game_private_key = 106;
	optional bool custom_game_penalties = 107;
	optional string lan_host_ping_location = 109;
	optional uint32 league_node_id = 110;
	optional uint32 match_duration = 111;
	optional uint32 league_phase = 113;
	optional bool experimental_gameplay_enabled = 116;
	repeated .CLobbyGuildChallenge guild_challenges = 117;
	repeated .CLobbyGuildDetails guild_details = 118;
	repeated int32 requested_hero_ids = 124;
	repeated .CMsgLobbyCoachFriendRequest coach_friend_requests = 125;
	optional bool is_in_steam_china = 126;
	optional bool with_scenario_save = 127;
	optional uint32 lobby_creation_time = 128;
	optional string event_game_definition = 129;
	optional .CDOTALobbyMatchQualityData match_quality_data = 131;
	repeated int32 requested_hero_teams = 132;
}

message CSODOTAServerLobby {
	repeated .CSODOTAServerLobbyMember all_members = 1;
	repeated .CSODOTALobby.CExtraMsg extra_startup_messages = 2;
	optional bool broadcast_active = 3;
}

message CSODOTAStaticLobby {
	repeated .CSODOTAStaticLobbyMember all_members = 1;
	optional bool is_player_draft = 2;
	optional bool is_last_match_in_series = 3;
}

message CSODOTAServerStaticLobby {
	repeated .CSODOTAServerStaticLobbyMember all_members = 1;
	optional float post_patch_strategy_time_buffer = 2;
	repeated .CMsgLobbyEventPoints lobby_event_points = 3;
	optional string broadcast_url = 4;
}

message CMsgAdditionalLobbyStartupAccountData {
	message ChatWheelMessageRange {
		optional uint32 message_id_start = 1 [default = 4294967295];
		optional uint32 message_id_end = 2 [default = 4294967295];
	}

	message PingWheelMessageRange {
		optional uint32 message_id_start = 1 [default = 4294967295];
		optional uint32 message_id_end = 2 [default = 4294967295];
	}

	optional uint32 account_id = 1;
	optional .CMsgLobbyPlayerPlusSubscriptionData plus_data = 2;
	repeated .CMsgAdditionalLobbyStartupAccountData.ChatWheelMessageRange unlocked_chat_wheel_message_ranges = 3;
	repeated .CMsgAdditionalLobbyStartupAccountData.PingWheelMessageRange unlocked_ping_wheel_message_ranges = 4;
}

message CMsgLobbyInitializationComplete {
}

message CMsgLobbyPlaytestDetails {
	optional string json = 1;
}

message CMsgLocalServerGuildData {
	optional uint32 guild_id = 1;
	optional .EEvent event_id = 2 [default = EVENT_ID_NONE];
	optional uint32 guild_points = 3;
	optional uint64 guild_logo = 4;
	optional uint32 guild_primary_color = 5;
	optional uint32 guild_secondary_color = 6;
	optional uint32 guild_pattern = 7;
	optional uint32 guild_flags = 8;
	optional uint32 guild_weekly_percentile = 9;
}

message CMsgLocalServerFakeLobbyData {
	optional uint32 account_id = 1;
	repeated .CMsgLobbyEventPoints event_points = 2;
	optional bool is_plus_subscriber = 3;
	optional uint32 primary_event_id = 4;
	optional uint32 favorite_team = 5;
	optional uint32 favorite_team_quality = 6;
	optional .CMsgLocalServerGuildData guild_info = 7;
	optional uint32 teleport_fx_level = 8;
	optional .CMsgAdditionalLobbyStartupAccountData additional_data = 9;
}
