You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
492 lines
12 KiB
492 lines
12 KiB
//====== Copyright 1996-2010, Valve Corporation, All rights reserved. =======
|
|
//
|
|
// Purpose: The file defines our Google Protocol Buffers which are used in over
|
|
// the wire messages between servers as well as between the TF GC and TF gameservers
|
|
// and clients.
|
|
//
|
|
//=============================================================================
|
|
|
|
// We care more about speed than code size
|
|
option optimize_for = SPEED;
|
|
|
|
// We don't use the service generation functionality
|
|
option cc_generic_services = false;
|
|
|
|
|
|
//
|
|
// STYLE NOTES:
|
|
//
|
|
// Use CamelCase CMsgMyMessageName style names for messages.
|
|
//
|
|
// Use lowercase _ delimited names like my_steam_id for field names, this is non-standard for Steam,
|
|
// but plays nice with the Google formatted code generation.
|
|
//
|
|
// Try not to use required fields ever. Only do so if you are really really sure you'll never want them removed.
|
|
// Optional should be preffered as it will make versioning easier and cleaner in the future if someone refactors
|
|
// your message and wants to remove or rename fields.
|
|
//
|
|
// Use fixed64 for JobId_t, GID_t, or SteamID. This is appropriate for any field that is normally
|
|
// going to be larger than 2^56. Otherwise use int64 for 64 bit values that are frequently smaller
|
|
// than 2^56 as it will safe space on the wire in those cases.
|
|
//
|
|
// Similar to fixed64, use fixed32 for RTime32 or other 32 bit values that are frequently larger than
|
|
// 2^28. It will save space in those cases, otherwise use int32 which will safe space for smaller values.
|
|
// An exception to this rule for RTime32 is if the value will frequently be zero rather than set to an actual
|
|
// time.
|
|
//
|
|
|
|
import "steammessages_ps3.proto";
|
|
|
|
// Shared objects
|
|
|
|
//
|
|
// CSOPartyInvite - sent from the GC to possible new party member
|
|
//
|
|
message CSOPartyInvite
|
|
{
|
|
optional uint64 group_id = 1;
|
|
optional fixed64 sender_id = 2;
|
|
optional string sender_name = 3;
|
|
};
|
|
|
|
// Sent from the GC to possible new lobby member
|
|
//
|
|
message CSOLobbyInvite
|
|
{
|
|
optional uint64 group_id = 1;
|
|
optional fixed64 sender_id = 2;
|
|
optional string sender_name = 3;
|
|
// TODO: Game mode, etc.
|
|
};
|
|
|
|
//
|
|
// CMsgSystemBroadcast
|
|
//
|
|
message CMsgSystemBroadcast
|
|
{
|
|
optional string message = 1; // the message to display on the client
|
|
};
|
|
|
|
//
|
|
// CMsgInviteToParty - sent from party leader to the GC
|
|
//
|
|
message CMsgInviteToParty
|
|
{
|
|
optional fixed64 steam_id = 1;
|
|
};
|
|
|
|
|
|
//
|
|
// CMsgInvitationCreated - sent from GC to the party leader
|
|
//
|
|
message CMsgInvitationCreated
|
|
{
|
|
optional uint64 group_id = 1;
|
|
optional fixed64 steam_id = 2;
|
|
};
|
|
|
|
|
|
//
|
|
// CMsgPartyInviteResponse - sent from client to GC when accepting/rejecting a CMsgPartyInvite
|
|
//
|
|
message CMsgPartyInviteResponse
|
|
{
|
|
optional uint64 party_id = 1;
|
|
optional bool accept = 2;
|
|
};
|
|
|
|
|
|
//
|
|
// CMsgKickFromParty - sent from party leader to the GC
|
|
//
|
|
message CMsgKickFromParty
|
|
{
|
|
optional fixed64 steam_id = 1;
|
|
};
|
|
|
|
//
|
|
// CMsgLeaveParty - sent from party member to the GC
|
|
//
|
|
message CMsgLeaveParty
|
|
{
|
|
};
|
|
|
|
//
|
|
// CMsgGameServerInfo - server address information
|
|
//
|
|
message CMsgGameServerInfo
|
|
{
|
|
optional fixed32 server_public_ip_addr = 1;
|
|
optional fixed32 server_private_ip_addr = 2;
|
|
optional uint32 server_port = 3;
|
|
optional uint32 server_tv_port = 4;
|
|
optional string server_key = 5;
|
|
optional bool server_hibernation = 6;
|
|
enum ServerType
|
|
{
|
|
UNSPECIFIED = 0; // We haven't received the type yet
|
|
GAME = 1; // Game server
|
|
PROXY = 2; // Source TV proxy relay
|
|
CONTROLLER = 3; // Game server/proxy controller/spawner
|
|
}
|
|
optional ServerType server_type = 7 [ default = UNSPECIFIED ];
|
|
optional uint32 server_region = 8; // Region value that matches regions.txt in the GC
|
|
};
|
|
|
|
//
|
|
// CMsgServerAvailable - send from a dedicated server to the GC to indicate availability
|
|
//
|
|
message CMsgServerAvailable
|
|
{
|
|
};
|
|
|
|
|
|
|
|
//
|
|
// Used by CEconGameAccountClient
|
|
//
|
|
message CSOEconGameAccountClient
|
|
{
|
|
optional uint32 additional_backpack_slots = 1 [ default = 0 ]; // the number of backpack slots this user has on top of DEFAULT_NUM_BACKPACK_SLOTS
|
|
optional bool trial_account = 2 [ default = false ];
|
|
optional bool eligible_for_online_play = 3 [ default = true ];
|
|
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 ];
|
|
};
|
|
|
|
//
|
|
// Used by CEconCraftingRecipe
|
|
//
|
|
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 forced_quality_match = 7;
|
|
optional bool ignore_enabled_flag = 8;
|
|
|
|
repeated CSOItemCriteriaCondition conditions = 9;
|
|
};
|
|
|
|
|
|
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;
|
|
};
|
|
|
|
//
|
|
// k_EMsgGCDev_NewItemRequest
|
|
//
|
|
message CMsgDevNewItemRequest
|
|
{
|
|
//using fixed64 since steamids have lots of entropy in their bits
|
|
optional fixed64 receiver = 1;
|
|
optional CSOItemCriteria criteria = 2;
|
|
};
|
|
|
|
//
|
|
// k_EMsgGCIncrementKillCountAttribute
|
|
//
|
|
message CMsgIncrementKillCountAttribute
|
|
{
|
|
optional uint64 killer_steam_id = 1;
|
|
optional uint64 victim_steam_id = 2;
|
|
optional uint64 item_id = 3;
|
|
|
|
optional uint32 event_type = 4;
|
|
};
|
|
|
|
|
|
//
|
|
// Used by CEconItem
|
|
//
|
|
message CSOEconItemAttribute
|
|
{
|
|
optional uint32 def_index = 1;
|
|
optional uint32 value = 2;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
//
|
|
// k_EMsgGCAdjustItemEquippedState
|
|
//
|
|
message CMsgAdjustItemEquippedState
|
|
{
|
|
optional uint64 item_id = 1;
|
|
optional uint32 new_class = 2;
|
|
optional uint32 new_slot = 3; // will be -1 if not equipped on this class any longer
|
|
}
|
|
|
|
//
|
|
// k_EMsgGCSortItems
|
|
//
|
|
message CMsgSortItems
|
|
{
|
|
optional uint32 sort_type = 1;
|
|
}
|
|
|
|
//
|
|
// Used by CEconClaimCode
|
|
//
|
|
message CSOEconClaimCode
|
|
{
|
|
optional uint32 account_id = 1;
|
|
optional uint32 code_type = 2;
|
|
optional uint32 time_acquired = 3;
|
|
optional string code = 4;
|
|
}
|
|
|
|
//
|
|
// k_EMsgGCStoreGetUserData
|
|
//
|
|
message CMsgStoreGetUserData
|
|
{
|
|
optional fixed32 price_sheet_version = 1;
|
|
}
|
|
|
|
|
|
//
|
|
// k_EMsgGCStoreGetUserDataResponse
|
|
//
|
|
message CMsgStoreGetUserDataResponse
|
|
{
|
|
optional int32 result = 1; // Result of the call
|
|
optional int32 currency = 2; // Currency to display to the user
|
|
optional string country = 3; // Country the purchase is being made from (Send back in k_EMsgGCStorePurchaseInit)
|
|
|
|
optional fixed32 price_sheet_version = 4; // Version of the current price sheet on the GC
|
|
|
|
// experiments
|
|
optional uint64 experiment_data = 5 [ default = 0 ]; // top 32 bits = experiment id, bottom 32 bits = experiment group number
|
|
optional int32 featured_item_idx = 6;
|
|
optional bool show_hat_descriptions = 7 [ default = true ];
|
|
|
|
// Serialized KV representing the price sheet menu
|
|
optional bytes price_sheet = 8;
|
|
|
|
optional int32 default_item_sort = 9 [ default = 0 ];
|
|
|
|
// popular items by def
|
|
repeated uint32 popular_items = 10;
|
|
};
|
|
|
|
//
|
|
// k_EMsgGCUpdateItemSchema
|
|
//
|
|
message CMsgUpdateItemSchema
|
|
{
|
|
optional bytes items_game = 1; // actual contents of items_game.txt (only used on dev)
|
|
optional fixed32 item_schema_version = 2; // Version of the items_game.txt we're using
|
|
optional string items_game_url = 3; // HTTP URL where they can use to fetch the one we're using, if theirs is out of date and we don't send the contents
|
|
};
|
|
|
|
//
|
|
// k_EMsgGCRequestItemSchemaData
|
|
//
|
|
message CMsgRequestItemSchemaData
|
|
{
|
|
};
|
|
|
|
// sent from the GC to a client telling him about a GC error
|
|
message CMsgGCError
|
|
{
|
|
optional string error_text = 1;
|
|
};
|
|
|
|
//
|
|
// k_EMsgGCRequestInventoryRefresh
|
|
//
|
|
message CMsgRequestInventoryRefresh
|
|
{
|
|
};
|
|
|
|
//
|
|
// k_EMsgGCConvarUpdated
|
|
//
|
|
message CMsgConVarValue
|
|
{
|
|
optional string name = 1;
|
|
optional string value = 2;
|
|
};
|
|
|
|
//
|
|
// k_EMsgGCReplicateConVars
|
|
//
|
|
message CMsgReplicateConVars
|
|
{
|
|
repeated CMsgConVarValue convars = 1;
|
|
};
|
|
|
|
//
|
|
// k_EMsgGCUseItemRequest
|
|
//
|
|
message CMsgUseItem
|
|
{
|
|
optional uint64 item_id = 1;
|
|
optional fixed64 target_steam_id = 2; // 64-bit field left over from original message
|
|
|
|
repeated uint32 gift__potential_targets = 3;
|
|
optional uint32 duel__class_lock = 4;
|
|
};
|
|
|
|
//
|
|
// k_EMsgGCReplay_UploadedToYouTube
|
|
//
|
|
message CMsgReplayUploadedToYouTube
|
|
{
|
|
optional string youtube_url = 1;
|
|
optional string youtube_account_name = 2;
|
|
optional uint64 session_id = 3;
|
|
};
|
|
|
|
//
|
|
// k_EMsgGCItemAcknowledged
|
|
//
|
|
message CMsgItemAcknowledged
|
|
{
|
|
optional uint32 account_id = 1;
|
|
optional uint32 inventory = 2;
|
|
optional uint32 def_index = 3;
|
|
optional uint32 quality = 4;
|
|
};
|
|
|
|
//
|
|
// CMsgSelectItemPresetForClass
|
|
//
|
|
message CMsgSelectItemPresetForClass
|
|
{
|
|
optional uint32 class_index = 2;
|
|
optional uint32 preset_index = 3;
|
|
};
|
|
|
|
//
|
|
// CSOSelectedItemPreset
|
|
//
|
|
message CSOSelectedItemPreset
|
|
{
|
|
optional uint32 account_id = 1 [ (key_field) = true ];
|
|
optional uint32 class_index = 2 [ (key_field) = true ];
|
|
optional uint32 preset_index = 3;
|
|
};
|
|
|
|
//
|
|
// CSOCommunityMapItem
|
|
//
|
|
message CSOItemCommunityMap
|
|
{
|
|
optional uint32 mapID = 1;
|
|
optional uint32 mapAuthorID = 2;
|
|
optional string mapName = 3;
|
|
optional string mapFilename = 4;
|
|
optional fixed64 mapUGCHandle = 5;
|
|
optional fixed64 mapUGCThumbHandle = 6;
|
|
optional uint32 mapVersion = 7;
|
|
optional fixed32 mapCreateDate = 8;
|
|
optional uint32 mapVoteUp = 9;
|
|
optional uint32 mapVoteDown = 10;
|
|
optional uint32 mapDownloads = 11;
|
|
optional uint32 userVoteStatus = 12;
|
|
optional bool userCompleted = 13;
|
|
optional fixed32 userDownloadTimestamp=14;
|
|
};
|
|
|
|
//
|
|
// CMsgPlaytestReportDemo
|
|
//
|
|
message CMsgPlaytestReportDemo
|
|
{
|
|
optional fixed64 author_id = 1;
|
|
optional fixed64 ugc_handle = 2;
|
|
optional fixed64 map_id = 3;
|
|
};
|
|
|
|
//
|
|
// CMsgPlaytestRetrieveDemoHandles
|
|
//
|
|
message CMsgPlaytestRetrieveDemoHandles
|
|
{
|
|
optional fixed64 author_id = 1;
|
|
};
|
|
|
|
//
|
|
// CMsgPlaytestRetrieveDemoHandlesResponse
|
|
//
|
|
message CMsgPlaytestRetrieveDemoHandlesResponse
|
|
{
|
|
optional fixed64 author_id = 1;
|
|
repeated fixed64 ugc_handle = 2;
|
|
repeated fixed64 map_id = 3;
|
|
};
|
|
|
|
//
|
|
// CMsgPlaytestRemoveDemo
|
|
//
|
|
message CMsgPlaytestRemoveDemo
|
|
{
|
|
optional fixed64 author_id = 1;
|
|
optional fixed64 ugc_handle = 2;
|
|
};
|
|
|