import "steammessages.proto";

option optimize_for = SPEED;
option cc_generic_services = false;

enum EGCBaseMsg {
	k_EMsgGCSystemMessage = 4001;
	k_EMsgGCReplicateConVars = 4002;
	k_EMsgGCConVarUpdated = 4003;
	k_EMsgGCServerAvailable = 4506;
	k_EMsgGCClientConnectToServer = 4507;
	k_EMsgGCGameServerInfo = 4508;
	k_EMsgGCError = 4509;
	k_EMsgGCReplay_UploadedToYouTube = 4510;
	k_EMsgGCLANServerAvailable = 4511;
}

enum EGCBaseProtoObjectTypes {
	k_EProtoObjectPartyInvite = 1001;
	k_EProtoObjectLobbyInvite = 1002;
}

enum GCGoodbyeReason {
	GCGoodbyeReason_GC_GOING_DOWN = 1;
	GCGoodbyeReason_NO_SESSION = 2;
}

message CGCStorePurchaseInit_LineItem {
	optional uint32 item_def_id = 1;
	optional uint32 quantity = 2;
	optional uint32 cost_in_local_currency = 3;
	optional uint32 purchase_type = 4;
}

message CMsgGCStorePurchaseInit {
	optional string country = 1;
	optional int32 language = 2;
	optional int32 currency = 3;
	repeated .CGCStorePurchaseInit_LineItem line_items = 4;
}

message CMsgGCStorePurchaseInitResponse {
	optional int32 result = 1;
	optional uint64 txn_id = 2;
}

message CMsgSystemBroadcast {
	optional string message = 1;
}

message CMsgClientHello {
	optional uint32 version = 1;
}

message CMsgServerHello {
	optional uint32 version = 1;
}

message CMsgClientWelcome {
	optional uint32 version = 1;
	optional bytes game_data = 2;
	optional string txn_country_code = 3;
}

message CMsgServerWelcome {
	optional uint32 min_allowed_version = 1;
	optional uint32 active_version = 2;
}

message CMsgClientGoodbye {
	optional .GCGoodbyeReason reason = 1 [default = GCGoodbyeReason_GC_GOING_DOWN];
}

message CMsgServerGoodbye {
	optional .GCGoodbyeReason reason = 1 [default = GCGoodbyeReason_GC_GOING_DOWN];
}

message CMsgServerAvailable {
}

message CMsgLANServerAvailable {
	optional fixed64 lobby_id = 1;
}

message CSOEconGameAccountClient {
	optional uint32 additional_backpack_slots = 1 [default = 0];
	optional bool trial_account = 2 [default = false];
	optional bool need_to_choose_most_helpful_friend = 4;
	optional bool in_coaches_list = 5;
	optional fixed32 trade_ban_expiration = 6;
	optional fixed32 duel_ban_expiration = 7;
	optional uint32 preview_item_def = 8 [default = 0];
	optional bool phone_verified = 19 [default = false];
	optional uint32 skill_rating_6v6 = 20;
	optional uint32 skill_rating_9v9 = 21;
	optional bool competitive_access = 23 [default = false];
	optional uint32 matchmaking_ranked_ban_expiration = 18;
	optional uint32 matchmaking_ranked_low_priority_expiration = 24;
	optional uint32 matchmaking_ranked_ban_last_duration = 25;
	optional uint32 matchmaking_ranked_low_priority_last_duration = 26;
	optional uint32 matchmaking_casual_ban_expiration = 27;
	optional uint32 matchmaking_casual_low_priority_expiration = 28;
	optional uint32 matchmaking_casual_ban_last_duration = 29;
	optional uint32 matchmaking_casual_low_priority_last_duration = 30;
	optional bool phone_identifying = 31 [default = false];
	optional bool disable_party_quest_progress = 32 [default = false];
	optional uint32 quest_reward_credits = 33;
	optional uint32 matchmaking_last_casual_excessive_reports_auto_ban_time = 34;
	optional uint32 matchmaking_last_comp_excessive_reports_auto_ban_time = 35;
}

message CSOItemCriteriaCondition {
	optional int32 op = 1;
	optional string field = 2;
	optional bool required = 3;
	optional float float_value = 4;
	optional string string_value = 5;
}

message CSOItemCriteria {
	optional uint32 item_level = 1;
	optional int32 item_quality = 2;
	optional bool item_level_set = 3;
	optional bool item_quality_set = 4;
	optional uint32 initial_inventory = 5;
	optional uint32 initial_quantity = 6;
	optional bool ignore_enabled_flag = 8;
	repeated .CSOItemCriteriaCondition conditions = 9;
	optional bool recent_only = 10;
	optional string tags = 11;
	optional string equip_regions = 12;
}

message CSOItemRecipe {
	optional uint32 def_index = 1;
	optional string name = 2;
	optional string n_a = 3;
	optional string desc_inputs = 4;
	optional string desc_outputs = 5;
	optional string di_a = 6;
	optional string di_b = 7;
	optional string di_c = 8;
	optional string do_a = 9;
	optional string do_b = 10;
	optional string do_c = 11;
	optional bool requires_all_same_class = 12;
	optional bool requires_all_same_slot = 13;
	optional int32 class_usage_for_output = 14;
	optional int32 slot_usage_for_output = 15;
	optional int32 set_for_output = 16;
	repeated .CSOItemCriteria input_items_criteria = 20;
	repeated .CSOItemCriteria output_items_criteria = 21;
	repeated uint32 input_item_dupe_counts = 22;
}

message CMsgDevNewItemRequest {
	optional fixed64 receiver = 1;
	optional .CSOItemCriteria criteria = 2;
}

message CMsgDevDebugRollLootRequest {
	optional fixed64 receiver = 1;
	optional string loot_list_name = 2;
}

message CMsgIncrementKillCountAttribute {
	optional uint64 killer_steam_id = 1;
	optional uint64 victim_steam_id = 2;
	optional uint64 item_id = 3;
	optional uint32 event_type = 4;
	optional uint32 increment_value = 5;
}

message CMsgIncrementKillCountAttribute_Multiple {
	repeated .CMsgIncrementKillCountAttribute msgs = 1;
}

message CMsgTrackUniquePlayerPairEvent {
	optional uint64 killer_steam_id = 1;
	optional uint64 victim_steam_id = 2;
	optional uint64 item_id = 3;
	optional uint32 event_type = 4;
}

message CMsgApplyStrangeCountTransfer {
	optional uint64 tool_item_id = 1;
	optional uint64 item_src_item_id = 2;
	optional uint64 item_dest_item_id = 3;
}

message CMsgApplyStrangePart {
	optional uint64 strange_part_item_id = 1;
	optional uint64 item_item_id = 2;
}

message CMsgApplyStrangeRestriction {
	optional uint64 strange_part_item_id = 1;
	optional uint64 item_item_id = 2;
	optional uint32 strange_attr_index = 3;
}

message CMsgApplyUpgradeCard {
	optional uint64 upgrade_card_item_id = 1;
	optional uint64 subject_item_id = 2;
}

message CSOEconItemAttribute {
	optional uint32 def_index = 1;
	optional uint32 value = 2;
	optional bytes value_bytes = 3;
}

message CSOEconItemEquipped {
	optional uint32 new_class = 1;
	optional uint32 new_slot = 2;
}

message CSOEconItem {
	optional uint64 id = 1;
	optional uint32 account_id = 2;
	optional uint32 inventory = 3;
	optional uint32 def_index = 4;
	optional uint32 quantity = 5;
	optional uint32 level = 6;
	optional uint32 quality = 7;
	optional uint32 flags = 8 [default = 0];
	optional uint32 origin = 9;
	optional string custom_name = 10;
	optional string custom_desc = 11;
	repeated .CSOEconItemAttribute attribute = 12;
	optional .CSOEconItem interior_item = 13;
	optional bool in_use = 14 [default = false];
	optional uint32 style = 15 [default = 0];
	optional uint64 original_id = 16 [default = 0];
	optional bool contains_equipped_state = 17;
	repeated .CSOEconItemEquipped equipped_state = 18;
	optional bool contains_equipped_state_v2 = 19;
}

message CMsgAdjustItemEquippedState {
	optional uint64 item_id = 1;
	optional uint32 new_class = 2;
	optional uint32 new_slot = 3;
}

message CMsgSortItems {
	optional uint32 sort_type = 1;
}

message CSOEconClaimCode {
	optional uint32 account_id = 1;
	optional uint32 code_type = 2;
	optional uint32 time_acquired = 3;
	optional string code = 4;
}

message CMsgStoreGetUserData {
	optional fixed32 price_sheet_version = 1;
}

message CMsgStoreGetUserDataResponse {
	optional int32 result = 1;
	optional int32 currency = 2;
	optional string country = 3;
	optional fixed32 price_sheet_version = 4;
	optional uint64 experiment_data = 5 [default = 0];
	optional int32 featured_item_idx = 6;
	optional bool show_hat_descriptions = 7 [default = true];
	optional bytes price_sheet = 8;
	optional int32 default_item_sort = 9 [default = 0];
	repeated uint32 popular_items = 10;
}

message CMsgUpdateItemSchema {
	optional bytes items_game = 1;
	optional fixed32 item_schema_version = 2;
	optional string items_game_url = 3;
	optional bytes signature = 4;
}

message CMsgGCError {
	optional string error_text = 1;
}

message CMsgRequestInventoryRefresh {
}

message CMsgConVarValue {
	optional string name = 1;
	optional string value = 2;
}

message CMsgReplicateConVars {
	repeated .CMsgConVarValue convars = 1;
}

message CMsgUseItem {
	optional uint64 item_id = 1;
	optional fixed64 target_steam_id = 2;
	repeated uint32 gift__potential_targets = 3;
	optional uint32 duel__class_lock = 4;
	optional fixed64 initiator_steam_id = 5;
	optional bool itempack__ack_immediately = 6;
}

message CMsgReplayUploadedToYouTube {
	optional string youtube_url = 1;
	optional string youtube_account_name = 2;
	optional uint64 session_id = 3;
}

message CMsgConsumableExhausted {
	optional int32 item_def_id = 1;
}

message CMsgItemAcknowledged {
	optional uint32 account_id = 1;
	optional uint32 inventory = 2;
	optional uint32 def_index = 3;
	optional uint32 quality = 4;
	optional uint32 rarity = 5;
	optional uint32 origin = 6;
	optional uint32 is_strange = 7;
	optional uint32 is_unusual = 8;
	optional float wear = 9;
}

message CMsgSetPresetItemPosition {
	optional uint32 class_id = 1;
	optional uint32 preset_id = 2;
	optional uint32 slot_id = 3;
	optional uint64 item_id = 4;
}

message CMsgSetItemPositions {
	message ItemPosition {
		optional uint64 item_id = 1;
		optional uint32 position = 2;
	}

	repeated .CMsgSetItemPositions.ItemPosition item_positions = 1;
}

message CSOEconItemPresetInstance {
	optional uint32 class_id = 2 [(key_field) = true];
	optional uint32 preset_id = 3 [(key_field) = true];
	optional uint32 slot_id = 4 [(key_field) = true];
	optional uint64 item_id = 5;
}

message CMsgSelectPresetForClass {
	optional uint32 class_id = 1;
	optional uint32 preset_id = 2;
}

message CSOClassPresetClientData {
	optional uint32 account_id = 1;
	optional uint32 class_id = 2;
	optional uint32 active_preset_id = 3;
}

message CMsgGCReportAbuse {
	optional fixed64 target_steam_id = 1;
	optional string description = 4;
	optional uint64 gid = 5;
	optional uint32 abuse_type = 2;
	optional uint32 content_type = 3;
	optional fixed32 target_game_server_ip = 6;
	optional uint32 target_game_server_port = 7;
}

message CMsgGCReportAbuseResponse {
	optional fixed64 target_steam_id = 1;
	optional uint32 result = 2;
	optional string error_message = 3;
}

message CMsgGCNameItemNotification {
	optional fixed64 player_steamid = 1;
	optional uint32 item_def_index = 2;
	optional string item_name_custom = 3;
}

message CMsgGCClientDisplayNotification {
	optional string notification_title_localization_key = 1;
	optional string notification_body_localization_key = 2;
	repeated string body_substring_keys = 3;
	repeated string body_substring_values = 4;
}

message CMsgGCShowItemsPickedUp {
	optional fixed64 player_steamid = 1;
}

message CMsgUpdatePeriodicEvent {
	optional uint32 account_id = 1;
	optional uint32 event_type = 2;
	optional uint32 amount = 3;
}

message CMsgGCIncrementKillCountResponse {
	optional uint32 killer_account_id = 1 [(key_field) = true];
	optional uint32 num_kills = 2;
	optional uint32 item_def = 3;
	optional uint32 level_type = 4;
}

message CMsgGCRemoveStrangePart {
	optional uint64 item_id = 1;
	optional uint32 strange_part_score_type = 2;
}

message CMsgGCRemoveUpgradeCard {
	optional uint64 item_id = 1;
	optional uint32 attribute_index = 2;
}

message CMsgGCRemoveCustomizationAttributeSimple {
	optional uint64 item_id = 1;
}

message CMsgGCResetStrangeScores {
	optional uint64 item_id = 1;
}

message CMsgGCItemPreviewItemBoughtNotification {
	optional uint32 item_def_index = 1;
}

message CMsgGCStorePurchaseCancel {
	optional uint64 txn_id = 1;
}

message CMsgGCStorePurchaseCancelResponse {
	optional uint32 result = 1;
}

message CMsgGCStorePurchaseFinalize {
	optional uint64 txn_id = 1;
}

message CMsgGCStorePurchaseFinalizeResponse {
	optional uint32 result = 1;
	repeated uint64 item_ids = 2;
}

message CMsgGCBannedWordListRequest {
	optional uint32 ban_list_group_id = 1;
	optional uint32 word_id = 2;
}

message CMsgGCGiftedItems {
	optional uint64 gifter_steam_id = 1;
	optional bool was_random_person = 2;
	repeated uint32 recipient_account_ids = 3;
}

message CMsgGCCollectItem {
	optional uint64 collection_item_id = 1;
	optional uint64 subject_item_id = 2;
}

message CMsgGCClientMarketDataRequest {
	optional uint32 user_currency = 1;
}

message CMsgGCClientMarketDataEntry {
	optional uint32 item_def_index = 1;
	optional uint32 item_quality = 2;
	optional uint32 item_sell_listings = 3;
	optional uint32 price_in_local_currency = 4;
}

message CMsgGCClientMarketData {
	repeated .CMsgGCClientMarketDataEntry entries = 1;
}

message CMsgApplyToolToItem {
	optional uint64 tool_item_id = 1;
	optional uint64 subject_item_id = 2;
}

message CMsgApplyToolToBaseItem {
	optional uint64 tool_item_id = 1;
	optional uint32 baseitem_def_index = 2;
}

message CMsgRecipeComponent {
	optional uint64 subject_item_id = 1;
	optional uint64 attribute_index = 2;
}

message CMsgFulfillDynamicRecipeComponent {
	optional uint64 tool_item_id = 1;
	repeated .CMsgRecipeComponent consumption_components = 2;
}

message CMsgSetItemEffectVerticalOffset {
	optional uint64 item_id = 1;
	optional float offset = 2;
}

message CMsgSetHatEffectUseHeadOrigin {
	optional uint64 item_id = 1;
	optional bool use_head = 2;
}

message CMsgDeliverGiftResponseGiver {
	optional uint32 response_code = 1;
	optional string receiver_account_name = 2;
}

message CSOEconGameAccountForGameServers {
	optional bool disable_party_quest_progress = 6 [default = false];
}

message CWorkshop_PopulateItemDescriptions_Request {
	message SingleItemDescription {
		optional uint32 gameitemid = 1;
		optional string item_description = 2;
	}

	message ItemDescriptionsLanguageBlock {
		optional string language = 1;
		repeated .CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription descriptions = 2;
	}

	optional uint32 appid = 1;
	repeated .CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock languages = 2;
}

message CWorkshop_GetContributors_Request {
	optional uint32 appid = 1;
	optional uint32 gameitemid = 2;
}

message CWorkshop_GetContributors_Response {
	repeated fixed64 contributors = 1;
}

message CWorkshop_SetItemPaymentRules_Request {
	message WorkshopItemPaymentRule {
		optional uint64 workshop_file_id = 1;
		optional float revenue_percentage = 2;
		optional string rule_description = 3;
	}

	message WorkshopDirectPaymentRule {
		optional uint64 workshop_file_id = 1;
		optional string rule_description = 2;
	}

	message PartnerItemPaymentRule {
		optional uint32 account_id = 1;
		optional float revenue_percentage = 2;
		optional string rule_description = 3;
	}

	optional uint32 appid = 1;
	optional uint32 gameitemid = 2;
	repeated .CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule associated_workshop_files = 3;
	repeated .CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule partner_accounts = 4;
	optional .CWorkshop_SetItemPaymentRules_Request.WorkshopDirectPaymentRule associated_workshop_file_for_direct_payments = 7;
}

message CWorkshop_SetItemPaymentRules_Response {
}

message CWorkshop_AddSpecialPayment_Request {
	optional uint32 appid = 1;
	optional uint32 gameitemid = 2;
	optional string date = 3;
	optional uint64 payment_us_usd = 4;
	optional uint64 payment_row_usd = 5;
}

message CWorkshop_AddSpecialPayment_Response {
}

message CWorkshop_GetSpecialPayments_Request {
	optional uint32 appid = 1;
	optional uint32 gameitemid = 2;
	optional string date = 3;
}

message CWorkshop_GetSpecialPayments_Response {
	message SpecialPayment {
		optional uint32 appid = 1;
		optional uint32 gameitemid = 2;
		optional string date = 3;
		optional uint64 net_payment_us_usd = 4;
		optional uint64 net_payment_row_usd = 5;
	}

	repeated .CWorkshop_GetSpecialPayments_Response.SpecialPayment special_payments = 1;
}
