-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathapi.proto
641 lines (517 loc) · 15.4 KB
/
api.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
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
syntax = "proto3";
package proto;
option go_package = "./proto";
import "common.proto";
import "apl.proto";
import "death_knight.proto";
import "druid.proto";
import "hunter.proto";
import "mage.proto";
import "paladin.proto";
import "priest.proto";
import "rogue.proto";
import "shaman.proto";
import "warlock.proto";
import "warrior.proto";
// NextIndex: 54
message Player {
// Label used for logging.
string name = 51;
Race race = 1;
Class class = 2;
EquipmentSpec equipment = 3;
Consumes consumes = 4;
UnitStats bonus_stats = 5;
bool enable_item_swap = 6;
ItemSwap item_swap = 7;
IndividualBuffs buffs = 8;
oneof spec {
BloodDeathKnight blood_death_knight = 9;
FrostDeathKnight frost_death_knight = 10;
UnholyDeathKnight unholy_death_knight = 11;
BalanceDruid balance_druid = 12;
FeralDruid feral_druid = 13;
GuardianDruid guardian_druid = 53;
RestorationDruid restoration_druid = 14;
BeastMasteryHunter beast_mastery_hunter = 15;
MarksmanshipHunter marksmanship_hunter = 16;
SurvivalHunter survival_hunter = 17;
ArcaneMage arcane_mage = 18;
FireMage fire_mage = 19;
FrostMage frost_mage = 20;
HolyPaladin holy_paladin = 21;
ProtectionPaladin protection_paladin = 22;
RetributionPaladin retribution_paladin = 23;
DisciplinePriest discipline_priest = 24;
HolyPriest holy_priest = 25;
ShadowPriest shadow_priest = 26;
AssassinationRogue assassination_rogue = 27;
CombatRogue combat_rogue = 28;
SubtletyRogue subtlety_rogue = 29;
ElementalShaman elemental_shaman = 30;
EnhancementShaman enhancement_shaman = 31;
RestorationShaman restoration_shaman = 32;
AfflictionWarlock affliction_warlock = 33;
DemonologyWarlock demonology_warlock = 34;
DestructionWarlock destruction_warlock = 35;
ArmsWarrior arms_warrior = 36;
FuryWarrior fury_warrior = 37;
ProtectionWarrior protection_warrior = 38;
}
// Talents in wowhead format, e.g. '01102123133-12312312-'
string talents_string = 39;
Glyphs glyphs = 40;
Profession profession1 = 41;
Profession profession2 = 42;
Cooldowns cooldowns = 43;
APLRotation rotation = 44;
// TODO: Move most of the remaining fields into a 'MiscellaneousPlayerOptions' message.
// This will remove a lot of the boilerplate code in the UI for each new field.
int32 reaction_time_ms = 45;
int32 channel_clip_delay_ms = 46;
bool in_front_of_target = 47;
double distance_from_target = 48;
double dark_intent_uptime = 52;
HealingModel healing_model = 49;
// Items/enchants/gems/etc to include in the database.
SimDatabase database = 50;
}
message Party {
repeated Player players = 1;
PartyBuffs buffs = 2;
}
message Raid {
repeated Party parties = 1;
// The number of parties in the raid who participate in the sim, e.g.
// 10-man vs 25-man raids. The remaining parties are unused but can hold
// bench players.
//
// If this value is 0, all parties are included.
int32 num_active_parties = 2;
RaidBuffs buffs = 7;
// Extra debuffs provided by buff bots in this raid.
// This is also used for debuffs in the individual sims.
Debuffs debuffs = 5;
// Players who will be tanking mobs.
repeated UnitReference tanks = 4;
// Staggers Stormstrike casts across Enhance Shaman to maximize charge usage.
bool stagger_stormstrikes = 3;
// Extra fake players to add. Currently only used by healing sims.
int32 target_dummies = 6;
}
message SimOptions {
int32 iterations = 1;
int64 random_seed = 2;
bool debug = 3; // Enables debug logging.
bool debug_first_iteration = 6;
bool is_test = 5; // Only used internally.
bool save_all_values = 7; // Only used internally.
bool interactive = 8; // Enables interactive mode.
bool use_labeled_rands = 9; // Use test level RNG.
}
// The aggregated results from all uses of a particular action.
message ActionMetrics {
ActionID id = 1;
// True if a melee action, false if a spell action.
bool is_melee = 2;
// Metrics for this action for each target.
// Note that some spells are untargeted, these will always have a single
// element in this array.
repeated TargetedActionMetrics targets = 3;
int32 spell_school = 4;
// True if action is applied/cast as a result of another action
bool is_passive = 5;
}
// Metrics for a specific action, when cast at a particular target.
message TargetedActionMetrics {
// Raid/Target Index of the unit these metrics are targeted at.
int32 unit_index = 12;
// # of times this action was used by the agent.
int32 casts = 1;
// # of times this action hit a target. For cleave spells this can be larger than casts.
int32 hits = 2;
// # of times this action was a critical strike.
int32 crits = 3;
// # of times this action ticked on a target.
int32 ticks = 21;
// # of times this action was a critical tick on a target.
int32 crit_ticks = 22;
// # of times this action was a Miss or Resist.
int32 misses = 4;
// # of times this action was a Dodge.
int32 dodges = 5;
// # of times this action was a Parry.
int32 parries = 6;
// # of times this action was a Block.
int32 blocks = 7;
// # of times this action was a Critical Block.
int32 crit_blocks = 20;
// # of times this action was a Glance.
int32 glances = 8;
// Total damage done to this target by this action.
double damage = 9;
// Total critical damage done to this target by this action.
double crit_damage = 15;
// Total tick damage done to this target by this action.
double tick_damage = 23;
// Total critical tick damage done to this target by this action.
double crit_tick_damage = 24;
// Total glancing damage done to this target by this action.
double glance_damage = 17;
// Total block damage done to this target by this action.
double block_damage = 18;
// Total critical block damage done to this target by this action.
double crit_block_damage = 19;
// Total threat done to this target by this action.
double threat = 10;
// Total healing done to this target by this action.
double healing = 11;
// Total critical healing done to this target by this action.
double crit_healing = 16;
// Total shielding done to this target by this action.
double shielding = 13;
// Total time spent casting this action, in milliseconds, either from hard casts, GCD, or channeling.
double cast_time_ms = 14;
}
message AggregatorData {
int32 n = 1;
double sumSq = 2;
}
message AuraMetrics {
ActionID id = 1;
double uptime_seconds_avg = 2;
double uptime_seconds_stdev = 3;
double procs_avg = 4;
AggregatorData aggregator_data = 5;
}
enum ResourceType {
ResourceTypeNone = 0;
ResourceTypeMana = 1;
ResourceTypeEnergy = 2;
ResourceTypeRage = 3;
ResourceTypeComboPoints = 4;
ResourceTypeFocus = 5;
ResourceTypeHealth = 6;
ResourceTypeRunicPower = 7;
ResourceTypeBloodRune = 8;
ResourceTypeFrostRune = 9;
ResourceTypeUnholyRune = 10;
ResourceTypeDeathRune = 11;
ResourceTypeSolarEnergy = 12;
ResourceTypeLunarEnergy = 13;
ResourceTypeHolyPower = 14;
}
message ResourceMetrics {
ActionID id = 1;
ResourceType type = 2;
// # of times this action was used by the agent.
int32 events = 3;
// Total resource gain from this action. Will be negative for spend actions.
double gain = 4;
// Like gain, but doesn't include gains over resource cap.
double actual_gain = 5;
}
message DistributionMetrics {
double avg = 1;
double stdev = 2;
double max = 3;
int64 max_seed = 5;
double min = 6;
int64 min_seed = 7;
map<int32, int32> hist = 4;
repeated double all_values = 8;
AggregatorData aggregator_data = 9;
}
// All the results for a single Unit (player, target, or pet).
message UnitMetrics {
string name = 9;
int32 unit_index = 13;
DistributionMetrics dps = 1;
DistributionMetrics threat = 8;
DistributionMetrics dtps = 11;
DistributionMetrics tmi = 16;
DistributionMetrics hps = 14;
DistributionMetrics tto = 15; // Time To OOM, in seconds.
// average seconds spent oom per iteration
double seconds_oom_avg = 3;
// Chance (0-1) representing probability of death. Used for tank sims.
double chance_of_death = 12;
repeated ActionMetrics actions = 5;
repeated AuraMetrics auras = 6;
repeated ResourceMetrics resources = 10;
repeated UnitMetrics pets = 7;
}
// Results for a whole raid.
message PartyMetrics {
DistributionMetrics dps = 1;
DistributionMetrics hps = 3;
repeated UnitMetrics players = 2;
}
// Results for a whole raid.
message RaidMetrics {
DistributionMetrics dps = 1;
DistributionMetrics hps = 3;
repeated PartyMetrics parties = 2;
}
message EncounterMetrics {
repeated UnitMetrics targets = 1;
}
enum SimType {
SimTypeUnknown = 0;
SimTypeIndividual = 1;
SimTypeRaid = 2;
}
enum ErrorOutcomeType {
ErrorOutcomeError = 0;
ErrorOutcomeAborted = 1;
}
message ErrorOutcome {
ErrorOutcomeType type = 1; // ErrorOutcomeError by default
string message = 2;
}
// RPC RaidSim
message RaidSimRequest {
string request_id = 5;
Raid raid = 1;
Encounter encounter = 2;
SimOptions sim_options = 3;
SimType type = 4;
}
// Result from running the raid sim.
message RaidSimResult {
RaidMetrics raid_metrics = 1;
EncounterMetrics encounter_metrics = 2;
string logs = 3;
// Needed for displaying the timeline properly when the duration +/- option
// is used.
double first_iteration_duration = 4;
double avg_iteration_duration = 6;
ErrorOutcome error = 5;
int32 iterations_done = 7;
}
message RaidSimRequestSplitRequest {
int32 split_count = 1;
RaidSimRequest request = 2;
}
message RaidSimRequestSplitResult {
// The actual split amount made
int32 splits_done = 1;
repeated RaidSimRequest requests = 2;
string error_result = 3;
}
message RaidSimResultCombinationRequest {
repeated RaidSimResult results = 1;
}
message AbortRequest {
string request_id = 1; // The request that should be aborted.
}
message AbortResponse {
string request_id = 1;
bool was_triggered = 2; // Id was known and abort signal was triggered.
}
// RPC ComputeStats
message ComputeStatsRequest {
Raid raid = 1;
Encounter encounter = 2;
}
message AuraStats {
ActionID id = 1;
int32 max_stacks = 2;
bool has_icd = 3;
bool has_exclusive_effect = 4;
}
message SpellStats {
ActionID id = 1;
bool is_castable = 2; // Whether this spell may be cast by the APL logic.
bool is_channeled = 7; // Whether this spell is a channeled spell (Mind Flay, Drain Soul, etc).
bool is_major_cooldown = 3; // Whether this spell is a major cooldown.
bool has_dot = 4; // Whether this spell applies a DoT effect.
bool has_shield = 6; // Whether this spell applies a shield effect.
bool prepull_only = 5; // Whether this spell may only be cast during prepull.
bool encounter_only = 8; // Whether this spell may only be cast during the encounter (not prepull).
bool has_cast_time = 9; // Whether this spell has a cast time or not.
bool is_friendly = 10; // Whether this spell should be cast on player units
}
message APLValidation {
LogLevel log_level = 1;
string validation = 2;
}
message APLActionStats {
repeated string warnings = 1 [deprecated=true];
repeated APLValidation validations = 2;
}
message UUIDValidations {
UUID uuid = 1;
repeated APLValidation validations = 2;
}
message APLStats {
repeated APLActionStats prepull_actions = 1;
repeated APLActionStats priority_list = 2;
repeated UUIDValidations uuid_validations = 3;
}
message UnitMetadata {
string name = 3;
repeated SpellStats spells = 1;
repeated AuraStats auras = 2;
}
message PetStats {
UnitMetadata metadata = 1;
}
message PlayerStats {
// Stats
UnitStats base_stats = 6;
UnitStats gear_stats = 1;
UnitStats talents_stats = 7;
UnitStats buffs_stats = 8;
UnitStats consumes_stats = 9;
UnitStats final_stats = 2;
repeated string sets = 3;
IndividualBuffs buffs = 4;
UnitMetadata metadata = 10;
APLStats rotation_stats = 12;
repeated PetStats pets = 11;
}
message PartyStats {
repeated PlayerStats players = 1;
}
message RaidStats {
repeated PartyStats parties = 1;
}
message TargetStats {
UnitMetadata metadata = 1;
}
message EncounterStats {
repeated TargetStats targets = 1;
}
message ComputeStatsResult {
RaidStats raid_stats = 1;
EncounterStats encounter_stats = 3;
string error_result = 2;
}
// RPC StatWeights
message StatWeightsRequest {
Player player = 1;
RaidBuffs raid_buffs = 2;
PartyBuffs party_buffs = 3;
Debuffs debuffs = 9;
Encounter encounter = 4;
SimOptions sim_options = 5;
repeated UnitReference tanks = 8;
repeated Stat stats_to_weigh = 6;
repeated PseudoStat pseudo_stats_to_weigh = 10;
Stat ep_reference_stat = 7;
}
message StatWeightsStatData {
int32 unit_stat = 1;
double mod_low = 2;
double mod_high = 3;
}
message StatWeightsStatRequestData {
StatWeightsStatData stat_data = 1;
RaidSimRequest request_low = 2;
RaidSimRequest request_high = 3;
}
message StatWeightRequestsData {
RaidSimRequest base_request = 1;
Stat ep_reference_stat = 2;
repeated StatWeightsStatRequestData stat_sim_requests = 3;
}
message StatWeightsStatResultData {
StatWeightsStatData stat_data = 1;
RaidSimResult result_low = 2;
RaidSimResult result_high = 3;
}
message StatWeightsCalcRequest {
RaidSimResult base_result = 1;
Stat ep_reference_stat = 2;
repeated StatWeightsStatResultData stat_sim_results = 3;
}
message StatWeightsResult {
StatWeightValues dps = 1;
StatWeightValues hps = 4;
StatWeightValues tps = 2;
StatWeightValues dtps = 3;
StatWeightValues tmi = 5;
StatWeightValues p_death = 6;
ErrorOutcome error = 7;
}
message StatWeightValues {
UnitStats weights = 1;
UnitStats weights_stdev = 2;
UnitStats ep_values = 3;
UnitStats ep_values_stdev = 4;
}
message AsyncAPIResult {
string progress_id = 1;
}
// ProgressMetrics are used by all async APIs
message ProgressMetrics {
int32 completed_iterations = 1;
int32 total_iterations = 2;
int32 completed_sims = 3;
int32 total_sims = 4;
bool presim_running = 8;
// Partial Results
double dps = 5;
double hps = 9;
// Final Results
RaidSimResult final_raid_result = 6; // only set when completed
StatWeightsResult final_weight_result = 7;
BulkSimResult final_bulk_result = 10;
}
// RPC: BulkSim
message BulkSimRequest {
RaidSimRequest base_settings = 1;
BulkSettings bulk_settings = 2;
}
message TalentLoadout {
string talents_string = 1;
Glyphs glyphs = 2;
string name = 3;
}
message BulkSettings {
repeated ItemSpec items = 1;
bool combinations = 2;
bool fast_mode = 3; // Used to run with less iterations to start and slowly increase to weed out items faster.
// Use current enchant on the slot if not specified by the ItemSpec.
// Only works when replacement item is valid target for enchant.
bool auto_enchant = 4;
// Currently not used.
// Used to fill out gem slots that are not filled in the ItemSpec
bool auto_gem = 5;
int32 default_red_gem = 6;
int32 default_blue_gem = 7;
int32 default_yellow_gem = 8;
int32 default_meta_gem = 9;
bool ensure_meta_req_met = 10; // ensures that meta requirements are met when auto-gemming.
// Number of iterations per combo.
// If set to 0 the sim core decides the optimal iterations.
int32 iterations_per_combo = 11;
// Should sim talents as well
bool sim_talents = 12;
repeated TalentLoadout talents_to_sim = 13;
}
message BulkSimResult {
repeated BulkComboResult results = 1;
BulkComboResult equipped_gear_result = 2;
ErrorOutcome error = 3;
}
message BulkComboResult {
repeated ItemSpecWithSlot items_added = 1;
UnitMetrics unit_metrics = 2;
TalentLoadout talent_loadout = 3;
}
message ItemSpecWithSlot {
ItemSpec item = 1;
ItemSlot slot = 2;
}
// RPC: BulkSimCombos
message BulkSimCombosRequest {
RaidSimRequest base_settings = 1;
BulkSettings bulk_settings = 2;
}
message BulkSimCombosResult {
int32 num_combinations = 1;
int32 num_iterations = 2;
string error_result = 3; // only set if sim failed.
}