generated from JoschiZ/WCL-TS-Components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRpgLogs.d.ts
2681 lines (2286 loc) · 73 KB
/
RpgLogs.d.ts
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
declare global {
/**
* The current API version. Used to see if a report component is out of date.
*/
const apiVersion: string;
/**
* The current report group.
*/
const reportGroup: RpgLogs.ReportGroup;
/**
* The translated language. Null if no language is set. This is only set if the user is forcing all logs to be translated to a specific language.
*/
const translatedLanguage: string | null;
/**
* Whether or not player names should be anonymized. You will not have access to the real names of the players if this is set.
*/
const anonymizePlayerNames: boolean;
/**
* The filters in effect for the fight.
*/
const fightFilters: RpgLogs.FightFilters;
/**
* The filters in effect for the fight.
*/
const eventFilters: RpgLogs.EventFilters;
/**
* The styles object that can be used to obtain actor and ability colors for charts and tables.
*/
const styles: RpgLogs.Styles;
/**
*
* @param params - The parameters to pass to getComponent.
* @returns The component that will be used.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let getComponent: (params?: any) => RpgLogs.Component | object | string | Array<unknown> | number;
/**
* The pinMatchesFightEvent function returns true for script pins that match the passed in event.
*/
let pinMatchesFightEvent: (
event: RpgLogs.AnyEvent,
fight: RpgLogs.Fight
) => boolean;
/**
* The initializePinForFight function lets you initialize fight-specific data before doing a new loop through a fight's events.
* You should discard any previous fight data.
*/
let initializePinForFight: (fight: RpgLogs.Fight) => void;
}
export namespace Highcharts {
type NYI = unknown;
// the T here is purely for documentation, not actually used
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface Unsupported<T = unknown> {
_: never;
}
/**
* A field where Highcharts supports HTML, but we do not. Tokens will be escaped.
* This will eventually be converted to Markdown, but that is NYI.
*
* Unfortunately, I can't get this docstring to show in Monaco, so it is duplicated on the text field.
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface Html extends String { } // see https://www.highcharts.com/docs/chart-concepts/security
type Css = NYI;
type GradientColorObject = { stops: Array<[number, Color]> } & (
| {
linearGradient: { x1: number; x2: number; y1: number; y2: number };
}
| { radialGradient: { cx: number; cy: number; r: number } }
);
type Color = string | GradientColorObject;
enum DashStyle {
Dash = 'Dash',
DashDot = 'DashDot',
Dot = 'Dot',
LongDash = 'LongDash',
LongDashDot = 'LongDashDot',
LongDashDotDot = 'LongDashDotDot',
ShortDash = 'ShortDash',
ShortDashDot = 'ShortDashDot',
ShortDashDotDot = 'ShortDashDotDot',
ShortDot = 'ShortDot',
Solid = 'Solid',
}
enum LinecapStyle {
Butt = 'butt',
Round = 'round',
Square = 'square',
}
namespace Series {
/**
* requires modules/boost, which we may not have?
*/
type BoostProps = {
boostBlending?: string;
boostThreshold?: number;
};
type AnimationProps = {
animation?: boolean;
animationLimit?: number;
};
type Data1D = number[];
type Data2D = Array<[number, number]>;
type DataNamed = Array<{
x?: number;
y?: number;
name?: string;
color?: Color;
[otherKey: string]: unknown;
}>;
type DataLabelOptions = NYI;
type DataSortingOptions = {
enabled?: boolean;
matchByName?: boolean;
sortKey?: string;
};
type ScatterJitterOptions = {
x: number;
y: number;
};
type ScatterLabelOptions = NYI;
type ScatterMarkerOptions = {
enabled?: boolean;
enabledThreshold?: number;
fillColor?: Color;
height?: number;
lineColor?: Color;
lineWidth?: number;
radius?: number;
symbol?: string;
width?: number;
states?: NYI;
};
type OmitDisallowed<T> = Omit<
T,
| 'animationLimit'
| 'cursor'
| 'dragDrop'
| 'events'
| 'pointDescriptionFormatter'
| 'turboThreshold'
| keyof BoostProps
>;
type CommonProps = AnimationProps &
BoostProps & {
accessibility?: NYI;
allowPointSelect?: boolean;
className?: string;
clip?: boolean;
color?: Color;
colorAxis?: number | string | boolean;
colorIndex?: number;
colorKey?: string;
crisp?: boolean;
cropThreshold?: number;
cursor?: string;
custom?: Record<string, unknown>;
dashStyle?: DashStyle;
data: Data1D | Data2D | DataNamed;
dataAsColumns?: boolean;
dataLabels?: DataLabelOptions;
dataSorting?: DataSortingOptions;
description?: string;
dragDrop?: NYI;
enableMouseTracking?: boolean;
events?: NYI;
getExtremesFromAll?: boolean;
id?: string;
includeInDataExport?: boolean;
index?: number;
keys?: string[];
label?: ScatterLabelOptions;
legendIndex?: number;
linecap?: LinecapStyle | string;
lineWidth?: number;
linkedTo?: string;
marker?: ScatterMarkerOptions;
name?: string;
negativeColor?: Color;
onPoint?: NYI;
opacity?: number;
point?: NYI;
pointDescriptionFormatter?: NYI;
pointInterval?: number;
pointIntervalUnit?: string;
pointPlacement?: 'on' | 'between' | number;
pointStart?: number;
relativeXValue?: boolean;
selected?: boolean;
shadow?: NYI;
showCheckbox?: boolean;
showInLegend?: boolean;
skipKeyboardNavigation?: boolean;
softThreshold?: boolean;
stack?: number | string;
stacking?: 'normal' | 'percent';
states?: NYI;
step?: 'left' | 'center' | 'right';
stickyTracking?: boolean;
threshold?: number | null;
tooltip?: NYI;
turboThreshold?: number;
visible?: boolean;
xAxis?: number | string;
yAxis?: number | string;
zIndex?: number;
zoneAxis?: 'x' | 'y' | 'z';
zones?: NYI;
};
type BaseSeries<T extends string> = OmitDisallowed<CommonProps> & {
type: T;
};
/**
* @see https://api.highcharts.com/highcharts/series.scatter
*/
export type Scatter = BaseSeries<'scatter'> &
Partial<{
cluster: NYI;
jitter: ScatterJitterOptions;
}>;
/**
* @see https://api.highcharts.com/highcharts/series.line
*/
export type Line = BaseSeries<'line'> &
Partial<{
connectEnds: boolean;
connectNulls: boolean;
findNearestPointBy: string;
}>;
/**
* @see https://api.highcharts.com/highcharts/series.bar
*/
export type Bar = BaseSeries<'bar'> & {
borderColor: Color;
borderRadius: number;
borderWidth: number;
centerInCategory: boolean;
edgeColor: Color;
edgeWidth: number;
findNearestPointBy: string;
grouping: boolean;
groupPadding: number;
groupZPadding: number;
pointRange: number | null;
depth: number;
};
// sometimes any is justified, man
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type ExtendedSeries<T extends BaseSeries<any>, Key> = Omit<T, 'type'> & {
type: Key;
};
/**
* @see https://api.highcharts.com/highcharts/series.histogram
*/
export type Histogram = ExtendedSeries<Bar, 'histogram'> &
Partial<{
/**
* The number of bins to use.
*
* The Highchart docs indicate that you can use a function for this, but that is not supported
* within a report component.
*/
binsNumber: 'square-root' | 'sturges' | 'rice' | number;
binWidth: number;
connectEnds: boolean;
connectNulls: boolean;
}>;
/**
* @see https://api.highcharts.com/highcharts/series.boxplot
*/
export type BoxPlot = BaseSeries<'boxplot'> &
Partial<{
boxDashStyle: DashStyle;
centerInCategory: boolean;
colorByPoint: boolean;
colors: Color[];
connectEnds: boolean;
connectNulls: boolean;
depth: number;
edgeColor: Color;
edgeWidth: number;
fillColor: Color;
grouping: boolean;
groupPadding: number;
medianColor: Color;
medianDashStyle: DashStyle;
medianWidth: number | null;
minPointLength: number;
pointRange: number | null;
stemDashStyle: DashStyle;
stemWidth: number;
whiskerColor: Color;
whiskerDashStyle: DashStyle;
whiskerLength: number;
whiskerWidth: number;
}>;
type KnownSeries = Scatter | Line | Histogram | Bar | BoxPlot;
type UnknownSeries = BaseSeries<any>;
/**
* @see https://api.highcharts.com/highcharts/series
*/
export type Any = KnownSeries | UnknownSeries;
}
type AsOptions<T> = Omit<T, 'data'>;
type TextOptions = Partial<{
align: 'left' | 'center' | 'right';
floating: boolean;
margin: number;
/**
* Text to display.
*
* Note that while Highcharts supports HTML, we do not. HTML-like tokens will be escaped.
* This will eventually be converted to Markdown, but that is NYI.
*
* This note applies to all fields labeled with the `Html` type.
*/
text: Html;
verticalAlign: 'top' | 'middle' | 'bottom';
x: number;
y: number;
useHTML: boolean;
style: Css;
}>;
type TooltipOptions = Partial<{
animation: boolean;
backgroundColor: Color;
borderColor: Color;
borderRadius: number;
borderWidth: number;
className: Unsupported;
dateTimeLabelFormats: NYI;
distance: number;
enabled: boolean;
followPointer: boolean;
followTouchMove: boolean;
clusterFormat: Html;
footerFormat: Html;
formatter: Unsupported;
headerFormat: Html;
headerShape: NYI;
hideDelay: number;
nullFormat: Html;
nullFormatter: Unsupported;
outside: boolean;
padding: number;
pointFormat: Html;
positioner: Unsupported;
shadow: boolean | NYI;
shape: 'callout' | 'circle' | 'square';
shared: boolean;
snap: number;
split: boolean;
stickOnContact: boolean;
style: Css;
useHTML: boolean;
valueDecimals: number | undefined;
valuePrefix: string;
valueSuffix: string;
xDateFormat: string;
}>;
type AxisOptions = Partial<{
accessibility: NYI;
alignTicks: boolean;
allowDecimals: boolean;
alternateGridColor: Color;
angle: number;
breaks: NYI;
categories: string[];
ceiling: number;
className: Unsupported;
crosshair: NYI;
dateTimeLabelFormats: NYI;
endOnTick: boolean;
events: Unsupported;
floor: number;
gridLineColor: Color;
gridLineDashStyle: DashStyle;
gridLineInterpolation: 'circle' | 'polygon';
gridLineWidth: number;
gridZIndex: number;
height: number | string;
id: string;
labels: NYI;
left: number | string;
lineColor: Color;
lineWidth: number;
linkedTo: number;
margin: number;
max: number | null;
maxPadding: number;
min: number | null;
minorGridLineColor: Color;
minorGridLineDashStyle: DashStyle;
minorGridLineWidth: number;
minorTickColor: Color;
minorTickInterval: number | string | null;
minorTickLength: number;
minorTickPosition: string;
minorTicks: boolean;
minorTickWidth: number;
minPadding: number;
minRange: number;
minTickInterval: number;
offset: number;
opposite: boolean;
pane: number;
panningEnabled: boolean;
plotBands: NYI;
plotLines: NYI;
reversed: boolean;
reversedStacks: boolean;
showEmpty: boolean;
showFirstLabel: boolean;
showLastLabel: boolean;
softMax: number;
softMin: number;
startOfWeek: number;
startOnTick: boolean;
tickAmount: number;
tickColor: Color;
tickInterval: number;
tickLength: number;
tickmarkPlacement: string;
tickPixelInterval: number;
tickPosition: string;
tickPositioner: Unsupported;
tickPositions: number[];
tickWidth: number | undefined;
title: NYI;
top: number | string;
type: 'linear' | 'logarithmic' | 'datetime' | 'category';
uniqueNames: boolean;
units: NYI;
visible: boolean;
width: number | string;
zIndex: number;
zoomEnabled: boolean;
}>;
type ChartOptions = NYI;
export type Options = {
plotOptions?: {
[Key in Series.Any['type']]: AsOptions<
Extract<Series.Any, { type: Key }>
>;
};
colors?: Color[];
series: Series.Any[];
caption?: TextOptions;
title?: TextOptions;
subtitle?: TextOptions;
tooltip?: TooltipOptions;
xAxis?: AxisOptions;
yAxis?: AxisOptions;
zAxis?: AxisOptions;
colorAxis?: NYI; // does not really share axis options with the x/y/z axes
chart?: ChartOptions;
annotations?: NYI[];
legend?: NYI;
labels?: NYI;
pane?: NYI;
time?: NYI;
};
}
// definitions/RpgLogs.d.ts
export namespace RpgLogs {
// this lint is disabled because interfaces show the new name in the Monaco editor, but type aliases do not
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ChartComponentProps extends Highcharts.Options { }
export interface ReportGroup {
/**
* The version of the parser that was used to parse the log file for this report.
*/
logVersion: number;
/**
* The game version of reports in the report group. For World of Warcraft, 1 = Retail, 2 = Vanilla, 3 = TBC, and 4 = Wrath.
* For other games, this will just be 1.
*/
gameVersion: number;
/**
* The language of the reports in the report group. Null if no language could be determined.
*/
language: string | null;
/**
* The set of actors that were seen in this report group. This includes all players, pets and NPCs.
*/
actors: Actor[];
/**
* The set of abilities that were seen in this report group.
*/
abilities: Ability[];
/**
* All of the fights in the report group.
*/
allFights: Fight[];
/**
* The set of fights that matches the report UI's filters for start time, end time, what encounters
* to allow, and whether or not to show trash, kills or wipes only.
*/
fights: Fight[];
/**
* All the reports loaded in this group.
*/
reports: Report[];
/**
* Obtain the damage done totals for actors or abilities.
*/
damageDoneEntries(
callback?: (event: AnyEvent) => boolean,
options?: number,
viewType?: 'source' | 'target' | 'ability'
): DamageHealingOrCastAmounts;
/**
* Obtain the damage taken totals for actors or abilities.
*/
damageTakenEntries(
callback?: (event: AnyEvent) => boolean,
options?: number,
viewType?: 'source' | 'target' | 'ability'
): DamageHealingOrCastAmounts;
/**
* Obtain the damage done totals for actors or abilities.
*/
healingDoneEntries(
callback?: (event: AnyEvent) => boolean,
options?: number,
viewType?: 'source' | 'target' | 'ability'
): DamageHealingOrCastAmounts;
/**
* Obtain the damage done totals for actors or abilities.
*/
castsEntries(
callback?: (event: AnyEvent) => boolean,
options?: number,
viewType?: 'source' | 'target' | 'ability'
): DamageHealingOrCastAmounts;
}
export interface Report {
/**
* The version of the parser that was used to parse the log file for this report.
*/
logVersion: number;
/**
* The game version of the report. For World of Warcraft, 1 = Retail, 2 = Vanilla, 3 = TBC, and 4 = Wrath.
* For other games, this will just be 1.
*/
gameVersion: number;
/**
* The language of the report. Null if no language could be determined.
*/
language: string | null;
/**
* The number of segments used by the report. Will increase as more fights get uploaded.
*/
segments: number;
/**
* The set of actors that were seen in this report. This includes all players, pets and NPCs.
*/
actors: Actor[];
/**
* The set of abilities that were seen in this report.
*/
abilities: Ability[];
/**
* All of the fights in the report.
*/
fights: Fight[];
/**
* All complete raids in the report. These include entire runs of instances in situations where those
* runs are supported (e.g., Serpentshrine Cavern, Sanctum of Domination, Naxxramas, etc.)
*/
completeRaids: CompleteRaid[];
}
/**
* Every report contains zero or more fights. Fights can be encounters or trash.
* An entire dungeon is considered one Fight as well, but you can access individual dungeon pulls within the Fight if needed.
* The Fight interface provides information such as the encounter id, the fight length, and the fight difficulty.
* Events that occurred during the fight are accessible from the events property, as well as other accessors that enable the fetching
* of specific categories of events.
*/
export interface Fight {
/**
* The id of the fight within its containing report group.
*/
id: number;
/**
* The id of the fight within its containing report.
*/
idInReport: number;
/**
* The report that the fight belongs to.
*/
report: Report;
/**
* The encounter id of the fight. Trash fights just have an encounter id of 0.
*/
encounterId: number;
/**
* The encounter size (number of players).
*/
size: number;
/**
* The encounter difficulty.
*/
difficulty: number;
/**
* Whether or not a fight with an encounter id was a kill.
*/
isKill: boolean;
/**
* A localized name for the fight. For encounters, it will be the encounter name, and for trash fights, it will
* be the name of the NPC with the most hit points that was involved in the fight.
*/
name: string;
/**
* The start time of the fight. This is an offset relative to the start of the report, not an absolute time.
* This offset is in milliseconds.
*/
startTime: number;
/**
* The end time of the fight. This is an offset relative to the start of the report, not an absolute time.
* This offset is in milliseconds.
*/
endTime: number;
/**
* Combatant info events respecting the user's filters. These are cached, so this is faster than trying to find them on your own.
*/
combatantInfoEvents: CombatantInfoEvent[];
/**
* All combatant info events. These are cached, so this is faster than trying to find them on your own.
*/
allCombatantInfoEvents: CombatantInfoEvent[];
/**
* Death events of friendly players respecting the user's filters. These are cached, so this is faster than trying to find them on your own.
*/
friendlyPlayerDeathEvents: DeathEvent[];
/**
* Death events of all friendly players. These are cached, so this is faster than trying to find them on your own.
*/
allFriendlyPlayerDeathEvents: DeathEvent[];
/**
* Death events of enemies respecting the user's filters. These are cached, so this is faster than trying to find them on your own.
* For PvE content, the deaths are limited to NPCs. For supported PvP content, the deaths are of enemy players.
*/
enemyDeathEvents: DeathEvent[];
/**
* Death events of enemies. These are cached, so this is faster than trying to find them on your own.
* For PvE content, the deaths are limited to NPCs. For supported PvP content, the deaths are of enemy players.
*/
allEnemyDeathEvents: DeathEvent[];
/**
* All of the events in this fight.
*/
allEvents: AnyEvent[];
/**
* The events of the fight respecting the user's filters.
*/
events: AnyEvent[];
/**
* This method will obtain a cached subset of events matching the specified category and disposition.
* The events will be filtered to the user's current event filters (e.g., phase, death cutoff, start/end time).
* @param category - The category of events to fetch
* @param disposition - The disposition of the actors to check. A value of "neutral" will be treated like "enemy".
* @returns The cached event set. Use this method to quickly retrieve a subset of events.
*/
eventsByCategoryAndDisposition(
category: EventCategory,
disposition: ActorDisposition
): AnyEvent[];
/**
* This method will obtain a cached subset of events matching the specified category and disposition.
* @param category - The category of events to fetch
* @param disposition - The disposition of the actors to check. A value of "neutral" will be treated like "enemy".
* @returns The cached event set. Use this method to quickly retrieve a subset of events.
*/
allEventsByCategoryAndDisposition(
category: EventCategory,
disposition: ActorDisposition
): AnyEvent[];
/**
* Helper function to obtain the phase an event occurs in.
* @param event - The event whose timestamp will be checked against the phase transitions.
* @returns The phase the event occurs in, or null if the fight has no phases.
*/
phaseForEvent(event: AnyEvent): number | null;
/**
* The phase names for all possible phases.
*/
phaseNames: Array<string> | null;
/**
* The phase transitions. Each entry in the array contains all of the start/end bands for that specific phase.
*/
phaseTransitions: Array<Array<Band>> | null;
/**
* For fights where downtime is supported and used to shrink the total time over which damage dealt is considered,
* this will contain an array of the start/end bands for every chunk of downtime.
*/
downtimeTransitions: Array<Band> | null;
/**
* Whether or not an actor is a friendly participant.
* @param actor - The actor to check.
* @returns Whether or not the actor is a friendly participant
*/
isFriendlyParticipant(actor: Actor): boolean;
/**
* Whether or not an actor is an enemy participant.
* @param actor - The actor to check.
* @returns Whether or not the actor is an enemy participant
*/
isEnemyParticipant(actor: Actor): boolean;
/**
* All the friendly participants in the fight.
*/
friendlyParticipants: Array<Actor>;
/**
* All the enemy participants in the fight.
*/
enemyParticipants: Array<Actor>;
/**
* The maps used by the fight.
*/
maps: Map;
/**
* The zone used by the fight.
*/
zone: Zone | null;
/**
* The bounding box for the fight in coordinates.
*/
minX: number;
maxX: number;
minY: number;
maxY: number;
/**
* For dungeons, individual pulls are stored and can be accessed.
*/
dungeonPulls: Array<DungeonPull>;
/**
* The world markers used by this fight.
*/
worldMarkers: Array<WorldMarker>;
/**
* Whether or not this event should be excluded from damage rankings.
* @param event - The event to check.
* @returns Whether or not the event counts as part of damage done ranks.
*/
isEventExcludedFromDamageRankings(event: AnyEvent): boolean;
/**
* Get the set of damage events and amounts that represent the damage healed by this event.
* The amount are distinct from the events themselves so that you can see when a heal only partially
* healed some of the damage.
* @param event - The event to check
* @returns - An array of events and the amount of damage healed for each event.
*/
damageEventsForHealingEvent(event: AnyEvent): Array<EventAndAmount> | null;
/**
* Get the set of healing events and amounts that represent the heals that were done for this damage.
* The amount are distinct from the events themselves so that you can see when a heal only partially
* healed some of the damage.
* @param event - The event to check
* @returns - An array of events and the amount of damage healed for each event.
*/
healingEventsForDamageEvent(event: AnyEvent): Array<EventAndAmount> | null;
/**
* Get the set of events that occurred prior to a specified player death.
* @param event - The death event to check
* @returns - An array of events going back to the last overheal the player received.
*/
eventsPriorToDeath(event: DeathEvent): Array<AnyEvent>;
/**
* The item level for a given actor.
* @param actor - The player to fetch the item level for.
* @returns - The item level of the actor
*/
itemLevelForPlayer(actor: Actor): number;
/**
* The spec for a given actor.
* @param actor - The player to fetch the spec for.
* @returns - The spec of the actor
*/
specForPlayer(actor: Actor): string;
/**
* The instance count for a given actor.
* @param actor - The actor to fetch the group count for.
* @returns - The instance count of the actor
*/
instanceCountForNpc(actor: Actor): number;
/**
* The instance group count for a given actor.
* @param actor - The actor to fetch the group count for.
* @returns - The group count of the actor
*/
instanceGroupCountForNpc(actor: Actor): number;
/**
* The season of Classic the fight belongs to. For example, Season of Mastery will have a season id of 1.
*/
classicSeasonId: number | null;
/**
* If the fight is a keystone dungeon, then this field contains the keystone level. Null otherwise.
*/
keystoneDungeonLevel: number | null;
/**
* If the fight is a keystone dungeon, then this field contains the official completion time. Null otherwise.
*/
keystoneDungeonTime: number | null;
/**
* If the fight is a keystone dungeon, then this field contains the set of affixes in effect. Null otherwise.
*/
keystoneDungeonAffixes: Array<number> | null;
/**
* If the fight is a tower run (e.g., Torghast), then this field contains the layer number. Null otherwise.
*/
towerLayer: number | null;
/**
* Whether or not the fight had classic world buffs on any player (Vanilla only)
*/
hasClassicWorldBuffs: boolean;
}
export type WorldMarker = {
/**
* The map game id that the marker was placed on.
*/
mapId: number;
/**
* The x position of the marker.
*/
x: number;
/**
* The y position of the marker.
*/
y: number;
/**
* The icon id that represents which marker it is.
*/
icon: number;
/**
* When the marker was placed.
*/
startTime: number;
/**
* When the marker was removed.
*/
endTime: number;
};
export type EventAndAmount = {
event: AnyEvent;
amount: number;
};
export interface DungeonPull {
/**
* The id of the pull.
*/
id: number;
/**
* The fight that the pull belongs to.
*/
fight: Fight;
/**
* The encounter id of the fight. Trash fights just have an encounter id of 0.
*/
encounterId: number;
/**
* Whether or not a fight with an encounter id was a kill.
*/
isKill: boolean;
/**
* The start time of the fight. This is an offset relative to the start of the report, not an absolute time.
* This offset is in milliseconds.
*/
startTime: number;
/**
* The end time of the fight. This is an offset relative to the start of the report, not an absolute time.
* This offset is in milliseconds.
*/
endTime: number;
/**
* All of the events in this pull.
*/
allEvents: AnyEvent[];
/**
* The events of the pull respecting the user's filters.
*/