summaryrefslogtreecommitdiff
path: root/game/shared/base_gcmessages.proto
blob: 3740b2d21145df1f28870de71630361d6726e1f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
//====== 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.proto";

// Messages
enum EGCBaseMsg
{
	k_EMsgGCSystemMessage =						4001; // broadcast announcements from the GC
	k_EMsgGCReplicateConVars =					4002; // GC => client
	k_EMsgGCConVarUpdated =						4003; // GC => client
	//k_EMsgGCInQueue =							4008; // GC => client

	// !GROSS! These have ben moved to gcsystemmsgs.proto.  But I didn't reassign their number
	//k_EMsgGCClientWelcome =						4004; // GC => client
	//k_EMsgGCServerWelcome =						4005; // GC => server
	//k_EMsgGCClientHello =						4006; // client => GC
	//k_EMsgGCServerHello =						4007; // server => GC
	//k_EMsgGCClientConnectionStatus =			4009; // GC => client
	//k_EMsgGCServerConnectionStatus =			4010; // GC => server

	// Matchmaking messages
	k_EMsgGCInviteToParty =						4501; // inviting another player to your party
	k_EMsgGCInvitationCreated =					4502; // sent from GC to sender
	k_EMsgGCPartyInviteResponse =				4503; // client accepting a party invite
	k_EMsgGCKickFromParty =						4504; // sent from party leader to GC to kick a player from the party
	k_EMsgGCLeaveParty = 						4505; // sent from party member to GC to leave a party
	k_EMsgGCServerAvailable =					4506; // send from a dedicated server when its ready
	k_EMsgGCClientConnectToServer =				4507; // sent to a client to connect to a server
	k_EMsgGCGameServerInfo =					4508; // send from a dedicated server for server address information
	k_EMsgGCError =								4509; // sent from GC to client telling client about an error
	k_EMsgGCReplay_UploadedToYouTube =			4510; // client => GC
	k_EMsgGCLANServerAvailable =				4511; // send from a listen server when its ready

};

//enum EGCSharedMsg							= 7001-7006

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

// Econ
message CGCStorePurchaseInit_LineItem
{
	optional	uint32	item_def_id = 1;			// DefIndex of the item to purchase
	optional	uint32	quantity = 2;				// quantity to purchase
	optional	uint32	cost_in_local_currency = 3;	// cost in cents of the local currency the user thinks he should pay (if you change this update item_price_t!)
	optional	uint32	purchase_type = 4;			// is this a regular purchase? a rental? maps to ECartItemType
};

// k_EMsgGCStorePurchaseInit
message CMsgGCStorePurchaseInit
{
	optional	string	country = 1;				// Country the purchase is being made from (obtained from Steam)
	optional	int32	language = 2;				// Client's language
	optional	int32	currency = 3;				// Currency the purchase is in (obtained from Steam)
	
	repeated	CGCStorePurchaseInit_LineItem	line_items = 4;
};

// k_EMsgGCStorePurchaseInitResponse
message CMsgGCStorePurchaseInitResponse
{
	optional	int32	result = 1;					// Result of the operation
	optional	uint64	txn_id = 2;					// Transaction ID of the new transaction
};


// Shared objects

//
// CSOPartyInvite	- sent from the GC to possible new party member
//
message CSOPartyInvite
{
	optional	uint64	group_id = 1 [ (key_field) = true ];
	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 [ (key_field) = true ];
	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
};

//
// CMsgClientHello
//
message CMsgClientHello
{
	optional uint32 version = 1;
};

//
// CMsgServerHello
//
message CMsgServerHello
{
	optional uint32 version = 1;
};

//
// CMsgClientWelcome
//
message CMsgClientWelcome
{
	optional uint32 version = 1;
	optional bytes game_data = 2;
};

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

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

//
// CMsgClientGoodbye
//
message CMsgClientGoodbye
{
	optional GCGoodbyeReason reason = 1;
};

//
// CMsgServerGoodbye
//
message CMsgServerGoodbye
{
	optional GCGoodbyeReason reason = 1;
};

//
// CMsgInviteToParty - sent from party leader to the GC
//
message CMsgInviteToParty
{
	optional	fixed64 steam_id = 1;
	optional	uint32	client_version = 2;
	optional	uint32	team_id = 3;
	optional	bool	as_coach = 4;
};


//
// 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;
	optional	uint32	client_version = 3;
	optional	uint32	team_id = 4;
	optional	bool	as_coach = 5;
};


//
// 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
{
	optional	uint64 party_id = 1;	// Party the user wants to leave
	optional	uint64 lobby_id = 2;	// Lobby the user wants to leave
};

//
// CMsgServerAvailable - send from a dedicated server to the GC to indicate availability
//
message CMsgServerAvailable
{
};

//
// CMsgLANServerAvailable - send from a listen server to the GC to indicate availability
//
message CMsgLANServerAvailable
{
	optional fixed64 lobby_id = 1;
};


//
// 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 ];		// DEPRECATED
	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		eligible_for_community_market = 9;						// DEPRECATED
	optional	bool		phone_verified = 19 [ default = false ];
	optional	uint32		skill_rating_6v6 = 20;
	optional	uint32		skill_rating_9v9 = 21;
//	optional	bool		two_factor_enabled = 22 [ default = false ]; // No longer shared with clients
	optional	bool		competitive_access = 23 [ default = false ];
	// !! 18 out of order slightly to be more properly grouped with the various ban fields
	optional	uint32		matchmaking_ranked_ban_expiration = 18;             // player can't matchmake in ranked groups until this time
	optional	uint32		matchmaking_ranked_low_priority_expiration = 24;    // MM low priority in ranked groups until
	optional	uint32		matchmaking_ranked_ban_last_duration = 25;          // How long the current ranked ban's total duration was set for
	optional	uint32		matchmaking_ranked_low_priority_last_duration = 26; // How long the current ranked ban's total duration was set for
	optional	uint32		matchmaking_casual_ban_expiration = 27;             // player can't matchmake in casual groups until this time
	optional	uint32		matchmaking_casual_low_priority_expiration = 28;    // MM low priority in casual groups until
	optional	uint32		matchmaking_casual_ban_last_duration = 29;          // How long the current casual ban's total duration was set for
	optional	uint32		matchmaking_casual_low_priority_last_duration = 30; // How long the current casual ban's total duration was set for
	optional	bool		phone_identifying = 31 [ default = false ];
};

//
// 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__DEPRECATED = 7;
	optional bool		ignore_enabled_flag = 8;

	repeated CSOItemCriteriaCondition	conditions = 9;	

	optional bool		recent_only = 10;
	optional string		tags = 11;
};


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_EMsgGCDev_DebugRollLootRequest
//
message CMsgDevDebugRollLootRequest
{
	//using fixed64 since steamids have lots of entropy in their bits
	optional fixed64 receiver = 1;
	optional string loot_list_name = 2;
};

//
// k_EMsgGC_IncrementKillCountAttribute
//
message CMsgIncrementKillCountAttribute
{
	optional uint64 killer_steam_id = 1;				// Kyle says: we could make these both fixed32!
	optional uint64 victim_steam_id = 2;
	optional uint64 item_id = 3;
	
	optional uint32 event_type = 4;
	optional uint32 increment_value = 5;				// How much to increment the score by
};

//
// k_EMsgGC_IncrementKillCountAttribute_Multiple
//
message CMsgIncrementKillCountAttribute_Multiple
{
	repeated CMsgIncrementKillCountAttribute msgs = 1;
};

//
// k_EMsgGC_TrackUniquePlayerPairEvent
//
message CMsgTrackUniquePlayerPairEvent
{
	optional uint64 killer_steam_id = 1;				// Kyle says: we could make these both fixed32!
	optional uint64 victim_steam_id = 2;
	optional uint64 item_id = 3;
	
	optional uint32 event_type = 4;
};

//
// k_EMsgGCApplyStrangeCountTransfer
//

message CMsgApplyStrangeCountTransfer
{
	optional uint64 tool_item_id = 1;					// item id of the xfer tool
	optional uint64 item_src_item_id = 2;
	optional uint64 item_dest_item_id = 3;
};

//
// k_EMsgGCApplyStrangePart
//
message CMsgApplyStrangePart
{
	optional uint64 strange_part_item_id = 1;			// which part are we "inserting"?
	optional uint64 item_item_id = 2;					// what strange item are we inserting this new part into?
};

//
// k_EMsgGCApplyStrangeRestriction
//
message CMsgApplyStrangeRestriction
{
	optional uint64 strange_part_item_id = 1;			// which restriction item are we "inserting"?
	optional uint64 item_item_id = 2;					// what strange item are we inserting this new part into?
	optional uint32 strange_attr_index = 3;				// which slot did the user select for application?
};

//
// k_EMsgGCApplyUpgradeCard
//
message CMsgApplyUpgradeCard
{
	optional uint64 upgrade_card_item_id = 1;			// which card are we attaching?
	optional uint64 subject_item_id = 2;				// what item are we applying this new card to?
};

//
// Used by CEconItem
//
message CSOEconItemAttribute
{
	optional uint32		def_index = 1;
	optional uint32		value = 2;						// DEPRECATED -- see value_bytes
	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;			// DEPRECATED
	repeated CSOEconItemEquipped	equipped_state = 18;
	optional bool					contains_equipped_state_v2 = 19;		// will be set to true even if equipped_state is an empty array, meaning "unequipped from everything"
}

// 
// 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
	optional bytes signature = 4; // signature of the schema (either the one at the CDN, or the bytes we are providing).  In certain branches (TF) this is required.
};

// 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;
	optional fixed64 initiator_steam_id = 5;
	optional bool itempack__ack_immediately = 6;
};

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

//
// k_EMsgGCConsumableExhausted
//
message CMsgConsumableExhausted
{
	optional int32 item_def_id = 1;
};

//
// k_EMsgGCItemAcknowledged
//
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;
};

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

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

// 
// CSOEconItemPresetInstance - The preset, class and slot ID's are all marked key fields, so that those
// fields will always be networked down to clients, even if only the item ID is modified.  This is so that
// when CSharedObjectTypeCache::BUpdateFromMsg() calls its FindSharedObject(), it will have the necessary
// key data for CEconItemPresetInstance::BIsKeyLess() to be able to function.  Without these, FindSharedObject()
// fails and no object is updated.
//
message CSOEconItemPresetInstance
{
//	optional uint32		account_id = 1;		// NOTE: Never use id '1' again - but we don't need to transmit the account id here
	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;
};

//
// k_EMsgGCPresets_SelectPresetForClass
//
message CMsgSelectPresetForClass
{
	optional uint32					class_id = 1;			// which class we're changing the selection on
	optional uint32					preset_id = 2;			// which preset we want to change to
};

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

//
// k_EMsgGC_ReportAbuse
//
message CMsgGCReportAbuse
{
	optional fixed64 target_steam_id = 1; // who is the user accusing?

	optional string description = 4; // in the user's own words
	optional uint64 gid = 5; // meaning depends on content type

	// If accusing a player:
	optional uint32 abuse_type = 2; // EAbuseReportType
	optional uint32 content_type = 3; // ECommunityContentType

	// If accusing a game server:
	optional fixed32 target_game_server_ip = 6;
	optional uint32 target_game_server_port = 7;
};

//
// k_EMsgGC_ReportAbuseResponse
//
message CMsgGCReportAbuseResponse
{
	optional fixed64 target_steam_id = 1; // target to which this reply is in reference
	optional uint32 result = 2; // EResult
	optional string error_message = 3; // Diagnostic error message (not localized, for debugging purposes only)
};

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

//
// k_EMsgGCClientDisplayNotification
//
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;
};

//
// k_EMsgGCShowItemsPickedUp
//
message CMsgGCShowItemsPickedUp
{
	optional	fixed64		player_steamid = 1;		
};

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

//
// k_EMsgGCIncrementKillCountResponse
//
message CMsgGCIncrementKillCountResponse			// was CMsgTFIncrementKillCountResponse
{
	optional uint32		killer_account_id = 1 [ (key_field) = true ];	// name of the user who got the kill
	optional uint32		num_kills = 2;									// number of kills (or: ubers released; or gifts given out; etc.)
	optional uint32		item_def = 3;									// id of the item in question
	optional uint32		level_type = 4;									// what sort of rank is this? (ie., kills, gifts, etc.) used for looking up strings
};

//
// k_EMsgGCRemoveStrangePart
//
message CMsgGCRemoveStrangePart
{
	optional uint64 item_id = 1;					// ID of the item we're removing a part from
	optional uint32 strange_part_score_type = 2;	// score type counted by the strange part we want to remove -- it doesn't matter what slot this part is in or what item def it came from as each item can only have one counter of each type
};

//
// k_EMsgGCRemoveUpgradeCard
//
message CMsgGCRemoveUpgradeCard
{
	optional uint64 item_id = 1;					// ID of the item we're removing a part from
	optional uint32 attribute_index = 2;			// the attribute index of the attribute we want to remove; this is only valid if the attribute is set to be user-customizable
};

//
// k_EMsgGCRemoveItemPaint
// k_EMsgGCRemoveCustomTexture
// k_EMsgGCRemoveMakersMark
//
message CMsgGCRemoveCustomizationAttributeSimple
{
	optional uint64 item_id = 1;
};

//
// k_EMsgGCResetStrangeScores
//
message CMsgGCResetStrangeScores
{
	optional uint64 item_id = 1;
};

//
// k_EMsgGCItemPreviewItemBoughtNotification
//
message CMsgGCItemPreviewItemBoughtNotification
{
	optional uint32 item_def_index = 1;
};

//
// k_EMsgGCStorePurchaseCancel
//
message CMsgGCStorePurchaseCancel
{
	optional uint64 txn_id = 1;			// Transaction ID for the the transaction
};

//
// k_EMsgGCStorePurchaseCancelResponse
//
message CMsgGCStorePurchaseCancelResponse
{
	optional uint32 result = 1;			// Result of the operation
};

//
// k_EMsgGCStorePurchaseFinalize
//
message CMsgGCStorePurchaseFinalize
{
	optional uint64 txn_id = 1;			// Transaction ID for the the transaction
};

//
// k_EMsgGCStorePurchaseFinalizeResponse
//
message CMsgGCStorePurchaseFinalizeResponse
{
	optional uint32 result = 1;			// Result of the operation
	repeated uint64 item_ids = 2;		// If successful, list of uint64's that represent the purchased items
};

// k_EMsgGCBannedWordListRequest
message CMsgGCBannedWordListRequest
{
	optional uint32			ban_list_group_id = 1;				// The group code to request the word list from (English, Chinese, etc)
	optional uint32			word_id = 2;						// The most recent word ID that we want to request (the response will include this ID if present)
};

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

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

//
// k_EMsgGCClientRequestMarketData
//
message CMsgGCClientMarketDataRequest
{
	optional uint32		user_currency = 1;
};

//
// k_EMsgGCClientRequestMarketDataResponse
//
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;
};

//
// k_EMsgGCApplyStrangifier
// k_EMsgGCUseItemEaterRecharger
//
message CMsgApplyToolToItem
{
	optional uint64 tool_item_id = 1;			// which item tool are we using
	optional uint64 subject_item_id = 2;		// what item are we applying this tool to?
};

message CMsgApplyToolToBaseItem
{
	optional uint64 tool_item_id = 1;			// which item tool are we using
	optional uint32 baseitem_def_index = 2;		// which base item def index are we applying this tool to?
};

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

//
// k_EMsgGCFulfillDynamicRecipeComponent
//
message CMsgFulfillDynamicRecipeComponent
{
	optional uint64 tool_item_id = 1;			// which item tool are we using
	repeated CMsgRecipeComponent consumption_components = 2;	// Items to consume
};

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

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

//
// k_EMsgGCDeliverGiftResponseGiver
//
message CMsgDeliverGiftResponseGiver
{
	optional uint32 response_code = 1;
	optional string receiver_account_name = 2;		// will only be set if found and if the user wasn't specifically selected
};

//
// Used by CEconGameAccountClientForGameServers
//
message CSOEconGameAccountForGameServers
{
	// Deprecated.
	// optional uint32 skill_rating = 3;
	// optional uint32 skill_rating_6v6 = 2;
	// optional uint32 skill_rating_9v9 = 4;
	// optional uint32 skill_rating_12v12 = 5;
};

// ================================================================================================
// ================================================================================================
// PROTOBUF DEFINITIONS COPIED FROM STEAM
// ================================================================================================
// ================================================================================================

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

	message ItemDescriptionsLanguageBlock
	{
		optional string language = 1;						// ICU name
		repeated SingleItemDescription descriptions = 2;
	}

	optional uint32 appid = 1;
	repeated 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 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 WorkshopItemPaymentRule associated_workshop_files = 3;
	repeated PartnerItemPaymentRule partner_accounts = 4;

}

message CWorkshop_SetItemPaymentRules_Response
{
}

// Don�t remove this line at the end of the file due a bug in the Mac OS X protobuf compiler