-
Notifications
You must be signed in to change notification settings - Fork 9
/
dota_usermessages.proto
executable file
·538 lines (475 loc) · 15.2 KB
/
dota_usermessages.proto
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
//====== Copyright (c) 2012, Valve Corporation, All rights reserved. ========//
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
//===========================================================================//
//
// Purpose: The file defines our Google Protocol Buffers which are used in over
// the wire messages for the Source engine.
//
//=============================================================================
// 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 safe 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 "google/protobuf/descriptor.proto";
// for CMsgVector, etc.
import "netmessages.proto";
// for Activity
import "ai_activity.proto";
// for structures shared between user and client messages
import "dota_commonmessages.proto";
//=============================================================================
// Dota User Messages
//=============================================================================
enum EDotaUserMessages
{
DOTA_UM_AddUnitToSelection = 64;
DOTA_UM_AIDebugLine = 65;
DOTA_UM_ChatEvent = 66;
DOTA_UM_CombatHeroPositions = 67;
DOTA_UM_CombatLogData = 68;
DOTA_UM_CombatLogShowDeath = 70;
DOTA_UM_CreateLinearProjectile = 71;
DOTA_UM_DestroyLinearProjectile = 72;
DOTA_UM_DodgeTrackingProjectiles = 73;
DOTA_UM_GlobalLightColor = 74;
DOTA_UM_GlobalLightDirection = 75;
DOTA_UM_InvalidCommand = 76;
DOTA_UM_LocationPing = 77;
DOTA_UM_MapLine = 78;
DOTA_UM_MiniKillCamInfo = 79;
DOTA_UM_MinimapDebugPoint = 80;
DOTA_UM_MinimapEvent = 81;
DOTA_UM_NevermoreRequiem = 82;
DOTA_UM_OverheadEvent = 83;
DOTA_UM_SetNextAutobuyItem = 84;
DOTA_UM_SharedCooldown = 85;
DOTA_UM_SpectatorPlayerClick = 86;
DOTA_UM_TutorialTipInfo = 87;
DOTA_UM_UnitEvent = 88;
DOTA_UM_ParticleManager = 89;
DOTA_UM_BotChat = 90;
DOTA_UM_HudError = 91;
DOTA_UM_ItemPurchased = 92;
DOTA_UM_Ping = 93;
DOTA_UM_ItemFound = 94;
}
//=============================================================================
message CDOTAUserMsg_AIDebugLine
{
optional string message = 1;
}
message CDOTAUserMsg_Ping
{
optional string message = 1;
}
enum DOTA_CHAT_MESSAGE
{
CHAT_MESSAGE_INVALID = -1;
CHAT_MESSAGE_HERO_KILL = 0;
CHAT_MESSAGE_HERO_DENY = 1;
CHAT_MESSAGE_BARRACKS_KILL = 2;
CHAT_MESSAGE_TOWER_KILL = 3;
CHAT_MESSAGE_TOWER_DENY = 4;
CHAT_MESSAGE_FIRSTBLOOD = 5;
CHAT_MESSAGE_STREAK_KILL = 6;
CHAT_MESSAGE_BUYBACK = 7;
CHAT_MESSAGE_AEGIS = 8;
CHAT_MESSAGE_ROSHAN_KILL = 9;
CHAT_MESSAGE_COURIER_LOST = 10;
CHAT_MESSAGE_COURIER_RESPAWNED = 11;
CHAT_MESSAGE_GLYPH_USED = 12;
CHAT_MESSAGE_ITEM_PURCHASE = 13;
CHAT_MESSAGE_CONNECT = 14;
CHAT_MESSAGE_DISCONNECT = 15;
CHAT_MESSAGE_DISCONNECT_WAIT_FOR_RECONNECT = 16;
CHAT_MESSAGE_DISCONNECT_TIME_REMAINING = 17;
CHAT_MESSAGE_DISCONNECT_TIME_REMAINING_PLURAL = 18;
CHAT_MESSAGE_RECONNECT = 19;
CHAT_MESSAGE_ABANDON = 20;
CHAT_MESSAGE_SAFE_TO_LEAVE = 21;
CHAT_MESSAGE_RUNE_PICKUP = 22;
CHAT_MESSAGE_RUNE_BOTTLE = 23;
CHAT_MESSAGE_INTHEBAG = 24;
CHAT_MESSAGE_SECRETSHOP = 25;
CHAT_MESSAGE_ITEM_AUTOPURCHASED = 26;
CHAT_MESSAGE_ITEMS_COMBINED = 27;
CHAT_MESSAGE_SUPER_CREEPS = 28;
CHAT_MESSAGE_CANT_USE_ACTION_ITEM = 29;
CHAT_MESSAGE_CHARGES_EXHAUSTED = 30;
CHAT_MESSAGE_CANTPAUSE = 31;
CHAT_MESSAGE_NOPAUSESLEFT = 32;
CHAT_MESSAGE_CANTPAUSEYET = 33;
CHAT_MESSAGE_PAUSED = 34;
CHAT_MESSAGE_UNPAUSE_COUNTDOWN = 35;
CHAT_MESSAGE_UNPAUSED = 36;
CHAT_MESSAGE_AUTO_UNPAUSED = 37;
CHAT_MESSAGE_YOUPAUSED = 38;
CHAT_MESSAGE_CANTUNPAUSETEAM = 39;
CHAT_MESSAGE_SAFE_TO_LEAVE_ABANDONER = 40;
CHAT_MESSAGE_VOICE_TEXT_BANNED = 41;
CHAT_MESSAGE_SPECTATORS_WATCHING_THIS_GAME = 42;
CHAT_MESSAGE_REPORT_REMINDER = 43;
CHAT_MESSAGE_ECON_ITEM = 44;
CHAT_MESSAGE_TAUNT = 45;
CHAT_MESSAGE_RANDOM = 46;
CHAT_MESSAGE_RD_TURN = 47;
}
message CDOTAUserMsg_ChatEvent
{
required DOTA_CHAT_MESSAGE type = 1;
optional uint32 value = 2;
// ugh
optional sint32 playerid_1 = 3 [ default = -1 ];
optional sint32 playerid_2 = 4 [ default = -1 ];
optional sint32 playerid_3 = 5 [ default = -1 ];
optional sint32 playerid_4 = 6 [ default = -1 ];
optional sint32 playerid_5 = 7 [ default = -1 ];
optional sint32 playerid_6 = 8 [ default = -1 ];
}
message CDOTAUserMsg_CombatLogData
{
optional uint32 type = 1;
optional uint32 target_name = 2;
optional uint32 attacker_name = 3;
optional bool attacker_illusion = 4;
optional bool target_illusion = 5;
optional uint32 inflictor_name = 6;
optional int32 value = 7;
optional int32 health = 8;
optional float time = 9;
}
message CDOTAUserMsg_CombatLogShowDeath
{
}
message CDOTAUserMsg_BotChat
{
optional uint32 player_id = 1;
optional string format = 2;
optional string message = 3;
optional string target = 4;
}
message CDOTAUserMsg_CombatHeroPositions
{
optional uint32 index = 1;
optional int32 time = 2;
optional CMsgVector2D world_pos = 3;
optional int32 health = 4;
}
message CDOTAUserMsg_MiniKillCamInfo
{
message Attacker
{
optional uint32 attacker = 1;
optional int32 total_damage = 2;
message Ability
{
optional uint32 ability = 1;
optional int32 damage = 2;
}
repeated Ability abilities = 3;
}
repeated Attacker attackers = 1;
}
message CDOTAUserMsg_GlobalLightColor
{
optional uint32 color = 1;
optional float duration = 2;
}
message CDOTAUserMsg_GlobalLightDirection
{
optional CMsgVector direction = 1;
optional float duration = 2;
}
message CDOTAUserMsg_LocationPing
{
optional uint32 player_id = 1;
optional CDOTAMsg_LocationPing location_ping = 2;
}
message CDOTAUserMsg_MinimapEvent
{
optional int32 event_type = 1;
optional int32 entity_handle = 2;
optional int32 x = 3;
optional int32 y = 4;
optional int32 duration = 5;
}
message CDOTAUserMsg_MapLine
{
optional int32 player_id = 1;
optional CDOTAMsg_MapLine mapline = 2;
}
message CDOTAUserMsg_MinimapDebugPoint
{
optional CMsgVector location = 1;
optional uint32 color = 2;
optional int32 size = 3;
optional float duration = 4;
}
message CDOTAUserMsg_CreateLinearProjectile
{
optional CMsgVector origin = 1;
optional CMsgVector2D velocity = 2;
optional int32 latency = 3;
optional int32 entindex = 4;
optional int32 particle_index = 5;
optional int32 handle = 6;
}
message CDOTAUserMsg_DestroyLinearProjectile
{
optional int32 handle = 1;
}
message CDOTAUserMsg_DodgeTrackingProjectiles
{
required int32 entindex = 1;
}
message CDOTAUserMsg_SpectatorPlayerClick
{
required int32 entindex = 1;
optional int32 order_type = 2;
optional int32 target_index = 3;
}
message CDOTAUserMsg_NevermoreRequiem
{
optional int32 entity_handle = 1;
optional int32 lines = 2;
optional CMsgVector origin = 3;
}
message CDOTAUserMsg_InvalidCommand
{
optional string message = 1;
}
message CDOTAUserMsg_HudError
{
optional int32 order_id = 1;
}
message CDOTAUserMsg_SharedCooldown
{
optional int32 entindex = 1;
optional string name = 2;
optional float cooldown = 3;
optional int32 name_index = 4;
}
message CDOTAUserMsg_SetNextAutobuyItem
{
optional string name = 1;
}
enum EDotaEntityMessages
{
DOTA_UNIT_SPEECH = 0;
DOTA_UNIT_SPEECH_MUTE = 1;
DOTA_UNIT_ADD_GESTURE = 2;
DOTA_UNIT_REMOVE_GESTURE = 3;
DOTA_UNIT_REMOVE_ALL_GESTURES = 4;
DOTA_UNIT_FADE_GESTURE = 6;
}
message CDOTAUserMsg_UnitEvent
{
required EDotaEntityMessages msg_type = 1;
required int32 entity_index = 2;
message Speech
{
optional int32 concept = 1;
optional string response = 2;
optional int32 recipient_type = 3;
optional int32 level = 4;
}
optional Speech speech = 3;
message SpeechMute
{
optional float delay = 1 [default = 0.5];
}
optional SpeechMute speech_mute = 4;
message AddGesture
{
optional Activity activity = 1;
optional int32 slot = 2;
optional float fade_in = 3 [default = 0];
optional float fade_out = 4 [default = 0.1];
}
optional AddGesture add_gesture = 5;
message RemoveGesture
{
optional Activity activity = 1;
}
optional RemoveGesture remove_gesture = 6;
message BloodImpact
{
optional int32 scale = 1;
optional int32 x_normal = 2;
optional int32 y_normal = 3;
}
optional BloodImpact blood_impact = 7;
message FadeGesture
{
optional Activity activity = 1;
}
optional FadeGesture fade_gesture = 8;
}
message CDOTAUserMsg_ItemPurchased
{
optional int32 item_index = 1;
}
message CDOTAUserMsg_ItemFound
{
optional int32 player = 1;
optional int32 quality = 2;
optional int32 rarity = 3;
optional int32 method = 4;
optional int32 itemdef = 5;
}
enum DOTA_PARTICLE_MESSAGE
{
DOTA_PARTICLE_MANAGER_EVENT_CREATE = 0;
DOTA_PARTICLE_MANAGER_EVENT_UPDATE = 1;
DOTA_PARTICLE_MANAGER_EVENT_UPDATE_FORWARD = 2;
DOTA_PARTICLE_MANAGER_EVENT_UPDATE_ORIENTATION = 3;
DOTA_PARTICLE_MANAGER_EVENT_UPDATE_FALLBACK = 4;
DOTA_PARTICLE_MANAGER_EVENT_UPDATE_ENT = 5;
DOTA_PARTICLE_MANAGER_EVENT_UPDATE_OFFSET = 6;
DOTA_PARTICLE_MANAGER_EVENT_DESTROY = 7;
DOTA_PARTICLE_MANAGER_EVENT_DESTROY_INVOLVING = 8;
DOTA_PARTICLE_MANAGER_EVENT_RELEASE = 9;
DOTA_PARTICLE_MANAGER_EVENT_LATENCY = 10;
};
message CDOTAUserMsg_ParticleManager
{
message ReleaseParticleIndex
{
}
message CreateParticle
{
optional int32 particle_name_index = 1;
optional int32 attach_type = 2;
optional int32 entity_handle = 3;
}
message DestroyParticle
{
optional bool destroy_immediately = 1;
}
message DestroyParticleInvolving
{
optional bool destroy_immediately = 1;
optional int32 entity_handle = 3;
}
message UpdateParticle
{
optional int32 control_point = 1;
optional CMsgVector position = 2;
}
message UpdateParticleFwd
{
optional int32 control_point = 1;
optional CMsgVector forward = 2;
}
message UpdateParticleOrient
{
optional int32 control_point = 1;
optional CMsgVector forward = 2;
optional CMsgVector right = 3;
optional CMsgVector up = 4;
}
message UpdateParticleFallback
{
optional int32 control_point = 1;
optional CMsgVector position = 2;
}
message UpdateParticleOffset
{
optional int32 control_point = 1;
optional CMsgVector origin_offset = 2;
}
message UpdateParticleEnt
{
optional int32 control_point = 1;
optional int32 entity_handle = 2;
optional int32 attach_type = 3;
optional int32 attachment = 4;
optional CMsgVector fallback_position = 5;
}
message UpdateParticleLatency
{
optional int32 player_latency = 1;
optional int32 tick = 2;
}
required DOTA_PARTICLE_MESSAGE type = 1;
required uint32 index = 2;
optional ReleaseParticleIndex release_particle_index = 3; // DOTA_PARTICLE_MANAGER_EVENT_RELEASE
optional CreateParticle create_particle = 4; // DOTA_PARTICLE_MANAGER_EVENT_CREATE
optional DestroyParticle destroy_particle = 5; // DOTA_PARTICLE_MANAGER_EVENT_DESTROY
optional DestroyParticleInvolving destroy_particle_involving = 6; // DOTA_PARTICLE_MANAGER_EVENT_DESTROY_INVOLVING
optional UpdateParticle update_particle = 7; // DOTA_PARTICLE_MANAGER_EVENT_UPDATE
optional UpdateParticleFwd update_particle_fwd = 8; // DOTA_PARTICLE_MANAGER_EVENT_UPDATE_FORWARD
optional UpdateParticleOrient update_particle_orient = 9; // DOTA_PARTICLE_MANAGER_EVENT_UPDATE_ORIENTATION
optional UpdateParticleFallback update_particle_fallback = 10; // DOTA_PARTICLE_MANAGER_EVENT_UPDATE_FALLBACK
optional UpdateParticleOffset update_particle_offset = 11; // DOTA_PARTICLE_MANAGER_EVENT_UPDATE_OFFSET
optional UpdateParticleEnt update_particle_ent = 12; // DOTA_PARTICLE_MANAGER_EVENT_UPDATE_ENT
optional UpdateParticleLatency update_particle_latency = 13; // DOTA_PARTICLE_MANAGER_EVENT_LATENCY
}
// If you modify this, make sure you update g_OverheadMessageType!
enum DOTA_OVERHEAD_ALERT
{
OVERHEAD_ALERT_GOLD = 0;
OVERHEAD_ALERT_DENY = 1;
OVERHEAD_ALERT_CRITICAL = 2;
OVERHEAD_ALERT_XP = 3;
OVERHEAD_ALERT_BONUS_SPELL_DAMAGE = 4;
OVERHEAD_ALERT_MISS = 5;
OVERHEAD_ALERT_DAMAGE = 6;
OVERHEAD_ALERT_EVADE = 7;
OVERHEAD_ALERT_BLOCK = 8;
OVERHEAD_ALERT_BONUS_POISON_DAMAGE = 9;
};
message CDOTAUserMsg_OverheadEvent
{
required DOTA_OVERHEAD_ALERT message_type = 1;
optional int32 value = 2;
optional int32 target_player_entindex = 3;
optional int32 target_entindex = 4;
optional int32 source_player_entindex = 5;
}
message CDOTAUserMsg_TutorialTipInfo
{
optional string name = 1;
optional int32 progress = 2;
}