@fnlb-project/fnbr 4.1.40 → 4.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/resources/BaseItemRating.json +0 -5203
- package/dist/resources/HomebaseRatingMapping.json +0 -255
- package/dist/resources/PowerLevelCurves.d.ts +0 -111
- package/dist/resources/PowerLevelCurves.js +0 -21
- package/dist/resources/PowerLevelCurves.js.map +0 -1
- package/dist/resources/SurvivorItemRating.json +0 -9343
- package/dist/src/managers/STWManager.d.ts +0 -29
- package/dist/src/managers/STWManager.js +0 -80
- package/dist/src/managers/STWManager.js.map +0 -1
- package/dist/src/managers/TournamentManager.d.ts +0 -51
- package/dist/src/managers/TournamentManager.js +0 -179
- package/dist/src/managers/TournamentManager.js.map +0 -1
- package/dist/src/stomp/EOSConnect.d.ts +0 -43
- package/dist/src/stomp/EOSConnect.js +0 -175
- package/dist/src/stomp/EOSConnect.js.map +0 -1
- package/dist/src/structures/EventTokens.d.ts +0 -32
- package/dist/src/structures/EventTokens.js +0 -45
- package/dist/src/structures/EventTokens.js.map +0 -1
- package/dist/src/structures/Tournament.d.ts +0 -86
- package/dist/src/structures/Tournament.js +0 -64
- package/dist/src/structures/Tournament.js.map +0 -1
- package/dist/src/structures/TournamentWindow.d.ts +0 -124
- package/dist/src/structures/TournamentWindow.js +0 -52
- package/dist/src/structures/TournamentWindow.js.map +0 -1
- package/dist/src/structures/stw/STWHero.d.ts +0 -61
- package/dist/src/structures/stw/STWHero.js +0 -38
- package/dist/src/structures/stw/STWHero.js.map +0 -1
- package/dist/src/structures/stw/STWHeroLoadout.d.ts +0 -44
- package/dist/src/structures/stw/STWHeroLoadout.js +0 -34
- package/dist/src/structures/stw/STWHeroLoadout.js.map +0 -1
- package/dist/src/structures/stw/STWItem.d.ts +0 -31
- package/dist/src/structures/stw/STWItem.js +0 -23
- package/dist/src/structures/stw/STWItem.js.map +0 -1
- package/dist/src/structures/stw/STWLocker.d.ts +0 -32
- package/dist/src/structures/stw/STWLocker.js +0 -26
- package/dist/src/structures/stw/STWLocker.js.map +0 -1
- package/dist/src/structures/stw/STWMeleeWeaponSchematic.d.ts +0 -14
- package/dist/src/structures/stw/STWMeleeWeaponSchematic.js +0 -15
- package/dist/src/structures/stw/STWMeleeWeaponSchematic.js.map +0 -1
- package/dist/src/structures/stw/STWNewsMessage.d.ts +0 -42
- package/dist/src/structures/stw/STWNewsMessage.js +0 -27
- package/dist/src/structures/stw/STWNewsMessage.js.map +0 -1
- package/dist/src/structures/stw/STWProfile.d.ts +0 -132
- package/dist/src/structures/stw/STWProfile.js +0 -283
- package/dist/src/structures/stw/STWProfile.js.map +0 -1
- package/dist/src/structures/stw/STWRangedWeaponSchematic.d.ts +0 -14
- package/dist/src/structures/stw/STWRangedWeaponSchematic.js +0 -15
- package/dist/src/structures/stw/STWRangedWeaponSchematic.js.map +0 -1
- package/dist/src/structures/stw/STWResource.d.ts +0 -27
- package/dist/src/structures/stw/STWResource.js +0 -22
- package/dist/src/structures/stw/STWResource.js.map +0 -1
- package/dist/src/structures/stw/STWSchematic.d.ts +0 -72
- package/dist/src/structures/stw/STWSchematic.js +0 -40
- package/dist/src/structures/stw/STWSchematic.js.map +0 -1
- package/dist/src/structures/stw/STWStats.d.ts +0 -103
- package/dist/src/structures/stw/STWStats.js +0 -85
- package/dist/src/structures/stw/STWStats.js.map +0 -1
- package/dist/src/structures/stw/STWSurvivor.d.ts +0 -104
- package/dist/src/structures/stw/STWSurvivor.js +0 -76
- package/dist/src/structures/stw/STWSurvivor.js.map +0 -1
- package/dist/src/structures/stw/STWTeamPerk.d.ts +0 -19
- package/dist/src/structures/stw/STWTeamPerk.js +0 -20
- package/dist/src/structures/stw/STWTeamPerk.js.map +0 -1
- package/dist/src/structures/stw/STWTrapSchematic.d.ts +0 -15
- package/dist/src/structures/stw/STWTrapSchematic.js +0 -16
- package/dist/src/structures/stw/STWTrapSchematic.js.map +0 -1
- package/dist/src/structures/stw/STWWeaponSchematic.d.ts +0 -15
- package/dist/src/structures/stw/STWWeaponSchematic.js +0 -16
- package/dist/src/structures/stw/STWWeaponSchematic.js.map +0 -1
- package/dist/src/util/BinaryWriter.d.ts +0 -79
- package/dist/src/util/BinaryWriter.js +0 -136
- package/dist/src/util/BinaryWriter.js.map +0 -1
- package/dist/src/util/CurveTable.d.ts +0 -24
- package/dist/src/util/CurveTable.js +0 -37
- package/dist/src/util/CurveTable.js.map +0 -1
- /package/dist/src/exceptions/{StompConnectionError.d.ts → STOMPConnectionError.d.ts} +0 -0
- /package/dist/src/exceptions/{StompConnectionError.js → STOMPConnectionError.js} +0 -0
- /package/dist/src/exceptions/{StompConnectionError.js.map → STOMPConnectionError.js.map} +0 -0
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
/* eslint-disable no-restricted-syntax */
|
|
5
|
-
const Base_1 = tslib_1.__importDefault(require("../Base"));
|
|
6
|
-
/**
|
|
7
|
-
* Represents a user's event tokens
|
|
8
|
-
*/
|
|
9
|
-
class EventTokens extends Base_1.default {
|
|
10
|
-
/**
|
|
11
|
-
* @param client The main client
|
|
12
|
-
* @param data The avatar's data
|
|
13
|
-
* @param user The user this avatar belongs to
|
|
14
|
-
*/
|
|
15
|
-
constructor(client, data, user) {
|
|
16
|
-
super(client);
|
|
17
|
-
this.tokens = data;
|
|
18
|
-
this.user = user;
|
|
19
|
-
this.arenaDivisionData = {};
|
|
20
|
-
this.geoIdentity = undefined;
|
|
21
|
-
for (const token of this.tokens) {
|
|
22
|
-
const type = token.split('_')[0];
|
|
23
|
-
switch (type) {
|
|
24
|
-
case 'ARENA':
|
|
25
|
-
{
|
|
26
|
-
let [, season, division] = token.split('_');
|
|
27
|
-
if (!division) {
|
|
28
|
-
division = season;
|
|
29
|
-
season = 'S9';
|
|
30
|
-
}
|
|
31
|
-
const divisionNumber = parseInt(division.replace('Division', ''), 10);
|
|
32
|
-
if (!this.arenaDivisionData[season.toLowerCase()] || this.arenaDivisionData[season.toLowerCase()] < divisionNumber) {
|
|
33
|
-
this.arenaDivisionData[season.toLowerCase()] = divisionNumber;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
break;
|
|
37
|
-
case 'GroupIdentity':
|
|
38
|
-
[, , this.geoIdentity] = token.split('_');
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.default = EventTokens;
|
|
45
|
-
//# sourceMappingURL=EventTokens.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EventTokens.js","sourceRoot":"","sources":["../../../src/structures/EventTokens.ts"],"names":[],"mappings":";;;AAAA,yCAAyC;AACzC,2DAA2B;AAK3B;;GAEG;AACH,MAAM,WAAY,SAAQ,cAAI;IAqB5B;;;;OAIG;IACH,YAAY,MAAc,EAAE,IAAc,EAAE,IAAU;QACpD,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAEjB,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAE7B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChC,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAEjC,QAAQ,IAAI,EAAE,CAAC;gBACb,KAAK,OAAO;oBAAE,CAAC;wBACb,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;wBAE5C,IAAI,CAAC,QAAQ,EAAE,CAAC;4BACd,QAAQ,GAAG,MAAM,CAAC;4BAClB,MAAM,GAAG,IAAI,CAAC;wBAChB,CAAC;wBAED,MAAM,cAAc,GAAG,QAAQ,CAAC,QAAS,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;wBAEvE,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAO,CAAC,WAAW,EAAE,CAAC,IAAI,IAAI,CAAC,iBAAiB,CAAC,MAAO,CAAC,WAAW,EAAE,CAAE,GAAG,cAAc,EAAE,CAAC;4BACtH,IAAI,CAAC,iBAAiB,CAAC,MAAO,CAAC,WAAW,EAAE,CAAC,GAAG,cAAc,CAAC;wBACjE,CAAC;oBACH,CAAC;oBAAC,MAAM;gBACR,KAAK,eAAe;oBAClB,CAAC,EAAC,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACzC,MAAM;YACV,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAED,kBAAe,WAAW,CAAC"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import Base from '../Base';
|
|
2
|
-
import TournamentWindow from './TournamentWindow';
|
|
3
|
-
import type { PlatformMappings, RegionMappings, TournamentData, TournamentDisplayData, TournamentMetadata } from '../../resources/httpResponses';
|
|
4
|
-
import type { FullPlatform, Region, TournamentColors, TournamentImages, TournamentTexts, TournamentWindowTemplate } from '../../resources/structs';
|
|
5
|
-
import type Client from '../Client';
|
|
6
|
-
/**
|
|
7
|
-
* Represents a Fortnite tournament
|
|
8
|
-
*/
|
|
9
|
-
declare class Tournament extends Base {
|
|
10
|
-
/**
|
|
11
|
-
* The tournament's ID
|
|
12
|
-
*/
|
|
13
|
-
id: string;
|
|
14
|
-
/**
|
|
15
|
-
* The regions of this tournament
|
|
16
|
-
*/
|
|
17
|
-
regions: Region[];
|
|
18
|
-
/**
|
|
19
|
-
* The region mappings
|
|
20
|
-
*/
|
|
21
|
-
regionMappings: RegionMappings;
|
|
22
|
-
/**
|
|
23
|
-
* The platforms of this tournament
|
|
24
|
-
*/
|
|
25
|
-
platforms: FullPlatform[];
|
|
26
|
-
/**
|
|
27
|
-
* The platform mappings
|
|
28
|
-
*/
|
|
29
|
-
platformMappings: PlatformMappings;
|
|
30
|
-
/**
|
|
31
|
-
* The tournament's display data ID
|
|
32
|
-
*/
|
|
33
|
-
displayDataId: string;
|
|
34
|
-
/**
|
|
35
|
-
* The event group
|
|
36
|
-
*/
|
|
37
|
-
eventGroup: string;
|
|
38
|
-
/**
|
|
39
|
-
* The tournament's announcement time
|
|
40
|
-
*/
|
|
41
|
-
announcementTime: Date;
|
|
42
|
-
/**
|
|
43
|
-
* The tournament's app ID
|
|
44
|
-
*/
|
|
45
|
-
appId?: any;
|
|
46
|
-
/**
|
|
47
|
-
* The environment
|
|
48
|
-
*/
|
|
49
|
-
environment?: any;
|
|
50
|
-
/**
|
|
51
|
-
* The tournament's meta data
|
|
52
|
-
*/
|
|
53
|
-
metadata: TournamentMetadata;
|
|
54
|
-
/**
|
|
55
|
-
* The tournament's start time
|
|
56
|
-
*/
|
|
57
|
-
beginTime: Date;
|
|
58
|
-
/**
|
|
59
|
-
* The tournament's end time
|
|
60
|
-
*/
|
|
61
|
-
endTime: Date;
|
|
62
|
-
/**
|
|
63
|
-
* The tournament's display color data
|
|
64
|
-
*/
|
|
65
|
-
colors: TournamentColors;
|
|
66
|
-
/**
|
|
67
|
-
* The tournament's display image data
|
|
68
|
-
*/
|
|
69
|
-
images: TournamentImages;
|
|
70
|
-
/**
|
|
71
|
-
* The tournament's display text data
|
|
72
|
-
*/
|
|
73
|
-
texts: TournamentTexts;
|
|
74
|
-
/**
|
|
75
|
-
* The tournament's windows
|
|
76
|
-
*/
|
|
77
|
-
windows: TournamentWindow[];
|
|
78
|
-
/**
|
|
79
|
-
* @param client The main client
|
|
80
|
-
* @param tournamentData The tournament data
|
|
81
|
-
* @param tournamentDisplayData The tournament display data
|
|
82
|
-
* @param templates The tournament template
|
|
83
|
-
*/
|
|
84
|
-
constructor(client: Client, tournamentData: TournamentData, tournamentDisplayData: TournamentDisplayData, templates: TournamentWindowTemplate[]);
|
|
85
|
-
}
|
|
86
|
-
export default Tournament;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const Base_1 = tslib_1.__importDefault(require("../Base"));
|
|
5
|
-
const TournamentWindow_1 = tslib_1.__importDefault(require("./TournamentWindow"));
|
|
6
|
-
/**
|
|
7
|
-
* Represents a Fortnite tournament
|
|
8
|
-
*/
|
|
9
|
-
class Tournament extends Base_1.default {
|
|
10
|
-
/**
|
|
11
|
-
* @param client The main client
|
|
12
|
-
* @param tournamentData The tournament data
|
|
13
|
-
* @param tournamentDisplayData The tournament display data
|
|
14
|
-
* @param templates The tournament template
|
|
15
|
-
*/
|
|
16
|
-
constructor(client, tournamentData, tournamentDisplayData, templates) {
|
|
17
|
-
super(client);
|
|
18
|
-
this.id = tournamentData.eventId;
|
|
19
|
-
this.regions = tournamentData.regions;
|
|
20
|
-
this.regionMappings = tournamentData.regionMappings;
|
|
21
|
-
this.platforms = tournamentData.platforms;
|
|
22
|
-
this.platformMappings = tournamentData.platformMappings;
|
|
23
|
-
this.displayDataId = tournamentData.displayDataId;
|
|
24
|
-
this.eventGroup = tournamentData.eventGroup;
|
|
25
|
-
this.announcementTime = new Date(tournamentData.announcementTime);
|
|
26
|
-
this.appId = tournamentData.appId;
|
|
27
|
-
this.environment = tournamentData.environment;
|
|
28
|
-
this.metadata = tournamentData.metadata;
|
|
29
|
-
this.beginTime = new Date(tournamentData.beginTime);
|
|
30
|
-
this.endTime = new Date(tournamentData.endTime);
|
|
31
|
-
this.colors = {
|
|
32
|
-
titleColor: tournamentDisplayData.title_color,
|
|
33
|
-
backgroundTextColor: tournamentDisplayData.background_text_color,
|
|
34
|
-
backgroundRightColor: tournamentDisplayData.background_right_color,
|
|
35
|
-
backgroundLeftColor: tournamentDisplayData.background_left_color,
|
|
36
|
-
shadowColor: tournamentDisplayData.shadow_color,
|
|
37
|
-
posterFadeColor: tournamentDisplayData.poster_fade_color,
|
|
38
|
-
baseColor: tournamentDisplayData.base_color,
|
|
39
|
-
highlightColor: tournamentDisplayData.highlight_color,
|
|
40
|
-
};
|
|
41
|
-
this.images = {
|
|
42
|
-
loadingScreenImage: tournamentDisplayData.loading_screen_image,
|
|
43
|
-
posterBackImage: tournamentDisplayData.poster_back_image,
|
|
44
|
-
posterFrontImage: tournamentDisplayData.poster_front_image,
|
|
45
|
-
playlistTileImage: tournamentDisplayData.playlist_tile_image,
|
|
46
|
-
};
|
|
47
|
-
this.texts = {
|
|
48
|
-
pinEarnedText: tournamentDisplayData.pin_earned_text,
|
|
49
|
-
pinScoreRequirement: tournamentDisplayData.pin_score_requirement,
|
|
50
|
-
scheduleInfo: tournamentDisplayData.schedule_info,
|
|
51
|
-
flavorDescription: tournamentDisplayData.flavor_description,
|
|
52
|
-
shortFormatTitle: tournamentDisplayData.short_format_title,
|
|
53
|
-
titleLine1: tournamentDisplayData.title_line_1,
|
|
54
|
-
titleLine2: tournamentDisplayData.title_line_2,
|
|
55
|
-
detailsDescription: tournamentDisplayData.details_description,
|
|
56
|
-
longFormatTitle: tournamentDisplayData.long_format_title,
|
|
57
|
-
backgroundTitle: tournamentDisplayData.background_title,
|
|
58
|
-
};
|
|
59
|
-
this.windows = tournamentData.eventWindows
|
|
60
|
-
.map((w) => { var _a; return new TournamentWindow_1.default(this, w, (_a = templates.find((t) => t.windowId === w.eventWindowId)) === null || _a === void 0 ? void 0 : _a.templateData); });
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.default = Tournament;
|
|
64
|
-
//# sourceMappingURL=Tournament.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tournament.js","sourceRoot":"","sources":["../../../src/structures/T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ournamentWindowMetadata, TournamentWindowScoreLocation, TournamentWindowTemplateData, TournamentWindowTemplatePayoutTable, TournamentWindowTemplateScoringRule, TournamentWindowTemplateTiebreakFormula } from '../../resources/httpResponses';
|
|
2
|
-
import type Tournament from './Tournament';
|
|
3
|
-
/**
|
|
4
|
-
* Represents a Fortnite tournament window
|
|
5
|
-
*/
|
|
6
|
-
declare class TournamentWindow {
|
|
7
|
-
/**
|
|
8
|
-
* The tournament this window belongs to
|
|
9
|
-
*/
|
|
10
|
-
tournament: Tournament;
|
|
11
|
-
/**
|
|
12
|
-
* The tournament window ID
|
|
13
|
-
*/
|
|
14
|
-
id: string;
|
|
15
|
-
/**
|
|
16
|
-
* The count down begin date
|
|
17
|
-
*/
|
|
18
|
-
countdownBeginTime: Date;
|
|
19
|
-
/**
|
|
20
|
-
* The tournament windows's begin time
|
|
21
|
-
*/
|
|
22
|
-
beginTime: Date;
|
|
23
|
-
/**
|
|
24
|
-
* The tournament windows's end time
|
|
25
|
-
*/
|
|
26
|
-
endTime: Date;
|
|
27
|
-
/**
|
|
28
|
-
* The blackout periods
|
|
29
|
-
*/
|
|
30
|
-
blackoutPeriods: TournamentWindowBlackoutPeriod[];
|
|
31
|
-
/**
|
|
32
|
-
* The round number
|
|
33
|
-
*/
|
|
34
|
-
round: number;
|
|
35
|
-
/**
|
|
36
|
-
* The payout delay
|
|
37
|
-
*/
|
|
38
|
-
payoutDelay: number;
|
|
39
|
-
/**
|
|
40
|
-
* Whether this tournament window is TBD
|
|
41
|
-
*/
|
|
42
|
-
isTBD: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Whether live spectating is enabled for this tournament window
|
|
45
|
-
*/
|
|
46
|
-
canLiveSpectate: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* The score locations
|
|
49
|
-
*/
|
|
50
|
-
scoreLocations: TournamentWindowScoreLocation[];
|
|
51
|
-
/**
|
|
52
|
-
* The tournament window's visibility
|
|
53
|
-
*/
|
|
54
|
-
visibility: string;
|
|
55
|
-
/**
|
|
56
|
-
* All required tokens to participate in this tournament window
|
|
57
|
-
*/
|
|
58
|
-
requireAllTokens: string[];
|
|
59
|
-
/**
|
|
60
|
-
* Any tokens required to participate in this tournament window
|
|
61
|
-
*/
|
|
62
|
-
requireAnyTokens: string[];
|
|
63
|
-
/**
|
|
64
|
-
* requireNoneTokensCaller
|
|
65
|
-
*/
|
|
66
|
-
requireNoneTokensCaller: string[];
|
|
67
|
-
/**
|
|
68
|
-
* requireAllTokensCaller
|
|
69
|
-
*/
|
|
70
|
-
requireAllTokensCaller: any[];
|
|
71
|
-
/**
|
|
72
|
-
* requireAnyTokensCaller
|
|
73
|
-
*/
|
|
74
|
-
requireAnyTokensCaller: any[];
|
|
75
|
-
/**
|
|
76
|
-
* Additional requirements to participate in this tournament window
|
|
77
|
-
*/
|
|
78
|
-
additionalRequirements: string[];
|
|
79
|
-
/**
|
|
80
|
-
* The team mate eligibility
|
|
81
|
-
*/
|
|
82
|
-
teammateEligibility: string;
|
|
83
|
-
/**
|
|
84
|
-
* The tournament window's meta data
|
|
85
|
-
*/
|
|
86
|
-
metadata: TournamentWindowMetadata;
|
|
87
|
-
/**
|
|
88
|
-
* The tournament windows's playlist id
|
|
89
|
-
*/
|
|
90
|
-
playlistId?: string;
|
|
91
|
-
/**
|
|
92
|
-
* The tournament window's match cap
|
|
93
|
-
*/
|
|
94
|
-
matchCap?: number;
|
|
95
|
-
/**
|
|
96
|
-
* The tournament windows's live session attributes
|
|
97
|
-
*/
|
|
98
|
-
liveSessionAttributes?: string[];
|
|
99
|
-
/**
|
|
100
|
-
* The tournament windows's scoring rules
|
|
101
|
-
*/
|
|
102
|
-
scoringRules?: TournamentWindowTemplateScoringRule[];
|
|
103
|
-
/**
|
|
104
|
-
* The tournament window's tiebreaker formula
|
|
105
|
-
*/
|
|
106
|
-
tiebreakerFormula?: TournamentWindowTemplateTiebreakFormula;
|
|
107
|
-
/**
|
|
108
|
-
* The tournament window's payout table
|
|
109
|
-
*/
|
|
110
|
-
payoutTable?: TournamentWindowTemplatePayoutTable[];
|
|
111
|
-
/**
|
|
112
|
-
* @param tournament The tournament this window belongs to
|
|
113
|
-
* @param windowData The tournament window's data
|
|
114
|
-
* @param tournamentWindowTemplateData The tournament window's template data
|
|
115
|
-
*/
|
|
116
|
-
constructor(tournament: Tournament, windowData: TournamentWindowData, tournamentWindowTemplateData?: TournamentWindowTemplateData);
|
|
117
|
-
/**
|
|
118
|
-
* Fetches the results for this tournament window
|
|
119
|
-
* @param page The results page index
|
|
120
|
-
* @param showLiveSessions Whether to show live sessions
|
|
121
|
-
*/
|
|
122
|
-
getResults(page?: number, showLiveSessions?: boolean): Promise<import("../../resources/httpResponses").TournamentWindowResults>;
|
|
123
|
-
}
|
|
124
|
-
export default TournamentWindow;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/**
|
|
4
|
-
* Represents a Fortnite tournament window
|
|
5
|
-
*/
|
|
6
|
-
class TournamentWindow {
|
|
7
|
-
/**
|
|
8
|
-
* @param tournament The tournament this window belongs to
|
|
9
|
-
* @param windowData The tournament window's data
|
|
10
|
-
* @param tournamentWindowTemplateData The tournament window's template data
|
|
11
|
-
*/
|
|
12
|
-
constructor(tournament, windowData, tournamentWindowTemplateData) {
|
|
13
|
-
Object.defineProperty(this, 'tournament', { value: tournament });
|
|
14
|
-
// Window data
|
|
15
|
-
this.id = windowData.eventWindowId;
|
|
16
|
-
this.countdownBeginTime = new Date(windowData.countdownBeginTime);
|
|
17
|
-
this.beginTime = new Date(windowData.beginTime);
|
|
18
|
-
this.endTime = new Date(windowData.endTime);
|
|
19
|
-
this.blackoutPeriods = windowData.blackoutPeriods;
|
|
20
|
-
this.round = windowData.round;
|
|
21
|
-
this.payoutDelay = windowData.payoutDelay;
|
|
22
|
-
this.isTBD = windowData.isTBD;
|
|
23
|
-
this.canLiveSpectate = windowData.canLiveSpectate;
|
|
24
|
-
this.scoreLocations = windowData.scoreLocations;
|
|
25
|
-
this.visibility = windowData.visibility;
|
|
26
|
-
this.requireAllTokens = windowData.requireAllTokens;
|
|
27
|
-
this.requireAnyTokens = windowData.requireAnyTokens;
|
|
28
|
-
this.requireNoneTokensCaller = windowData.requireNoneTokensCaller;
|
|
29
|
-
this.requireAllTokensCaller = windowData.requireAllTokensCaller;
|
|
30
|
-
this.requireAnyTokensCaller = windowData.requireAnyTokensCaller;
|
|
31
|
-
this.additionalRequirements = windowData.additionalRequirements;
|
|
32
|
-
this.teammateEligibility = windowData.teammateEligibility;
|
|
33
|
-
this.metadata = windowData.metadata;
|
|
34
|
-
// Template data
|
|
35
|
-
this.playlistId = tournamentWindowTemplateData === null || tournamentWindowTemplateData === void 0 ? void 0 : tournamentWindowTemplateData.playlistId;
|
|
36
|
-
this.matchCap = tournamentWindowTemplateData === null || tournamentWindowTemplateData === void 0 ? void 0 : tournamentWindowTemplateData.matchCap;
|
|
37
|
-
this.liveSessionAttributes = tournamentWindowTemplateData === null || tournamentWindowTemplateData === void 0 ? void 0 : tournamentWindowTemplateData.liveSessionAttributes;
|
|
38
|
-
this.scoringRules = tournamentWindowTemplateData === null || tournamentWindowTemplateData === void 0 ? void 0 : tournamentWindowTemplateData.scoringRules;
|
|
39
|
-
this.tiebreakerFormula = tournamentWindowTemplateData === null || tournamentWindowTemplateData === void 0 ? void 0 : tournamentWindowTemplateData.tiebreakerFormula;
|
|
40
|
-
this.payoutTable = tournamentWindowTemplateData === null || tournamentWindowTemplateData === void 0 ? void 0 : tournamentWindowTemplateData.payoutTable;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Fetches the results for this tournament window
|
|
44
|
-
* @param page The results page index
|
|
45
|
-
* @param showLiveSessions Whether to show live sessions
|
|
46
|
-
*/
|
|
47
|
-
async getResults(page = 0, showLiveSessions = false) {
|
|
48
|
-
return this.tournament.client.tournaments.getWindowResults(this.tournament.id, this.id, showLiveSessions, page);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.default = TournamentWindow;
|
|
52
|
-
//# sourceMappingURL=TournamentWindow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TournamentWindow.js","sourceRoot":"","sources":["../../../src/structures/TournamentWindow.ts"],"names":[],"mappings":";;AAOA;;GAEG;AACH,MAAM,gBAAgB;IAmIpB;;;;OAIG;IACH,YAAY,UAAsB,EAAE,UAAgC,EAAE,4BAA2D;QAC/H,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;QAEjE,cAAc;QACd,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC,aAAa,CAAC;QACnC,IAAI,CAAC,kBAAkB,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;QAClE,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC5C,IAAI,CAAC,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;QAClD,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;QAClD,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;QAChD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,CAAC;QACpD,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,CAAC;QACpD,IAAI,CAAC,uBAAuB,GAA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1
|
-
import STWItem from './STWItem';
|
|
2
|
-
import type { STWProfileHeroData } from '../../../resources/httpResponses';
|
|
3
|
-
import type { STWItemRarity, STWHeroType, STWItemTier } from '../../../resources/structs';
|
|
4
|
-
import type Client from '../../Client';
|
|
5
|
-
/**
|
|
6
|
-
* Represents a Save The World profile's hero
|
|
7
|
-
*/
|
|
8
|
-
declare class STWHero extends STWItem {
|
|
9
|
-
/**
|
|
10
|
-
* The hero's type.
|
|
11
|
-
*/
|
|
12
|
-
type: STWHeroType;
|
|
13
|
-
/**
|
|
14
|
-
* The hero's name.
|
|
15
|
-
*/
|
|
16
|
-
name?: string;
|
|
17
|
-
/**
|
|
18
|
-
* The hero's tier
|
|
19
|
-
*/
|
|
20
|
-
tier: STWItemTier;
|
|
21
|
-
/**
|
|
22
|
-
* The hero's rarity
|
|
23
|
-
*/
|
|
24
|
-
rarity: STWItemRarity;
|
|
25
|
-
/**
|
|
26
|
-
* The hero's level
|
|
27
|
-
*/
|
|
28
|
-
level: number;
|
|
29
|
-
/**
|
|
30
|
-
* The hero's max level bonus
|
|
31
|
-
*/
|
|
32
|
-
maxLevelBonus: number;
|
|
33
|
-
/**
|
|
34
|
-
* The hero's XP
|
|
35
|
-
*/
|
|
36
|
-
xp: number;
|
|
37
|
-
/**
|
|
38
|
-
* Whether the hero is marked as seen
|
|
39
|
-
*/
|
|
40
|
-
isSeen: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Whether the hero is marked as favorite
|
|
43
|
-
*/
|
|
44
|
-
isFavorite: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Whether the hero is marked as refundable
|
|
47
|
-
*/
|
|
48
|
-
isRefundable: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* @param client The main client
|
|
51
|
-
* @param id The item ID
|
|
52
|
-
* @param data The hero's data
|
|
53
|
-
*/
|
|
54
|
-
constructor(client: Client, id: string, data: STWProfileHeroData);
|
|
55
|
-
/**
|
|
56
|
-
* The hero's power level.
|
|
57
|
-
* Depends on the tier, level, and rarity value
|
|
58
|
-
*/
|
|
59
|
-
get powerLevel(): number;
|
|
60
|
-
}
|
|
61
|
-
export default STWHero;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const Util_1 = require("../../util/Util");
|
|
5
|
-
const STWItem_1 = tslib_1.__importDefault(require("./STWItem"));
|
|
6
|
-
/**
|
|
7
|
-
* Represents a Save The World profile's hero
|
|
8
|
-
*/
|
|
9
|
-
class STWHero extends STWItem_1.default {
|
|
10
|
-
/**
|
|
11
|
-
* @param client The main client
|
|
12
|
-
* @param id The item ID
|
|
13
|
-
* @param data The hero's data
|
|
14
|
-
*/
|
|
15
|
-
constructor(client, id, data) {
|
|
16
|
-
super(client, id, data);
|
|
17
|
-
const parsedHero = (0, Util_1.parseSTWHeroTemplateId)(data.templateId);
|
|
18
|
-
this.type = parsedHero.type;
|
|
19
|
-
this.name = parsedHero.name;
|
|
20
|
-
this.tier = parsedHero.tier;
|
|
21
|
-
this.rarity = parsedHero.rarity;
|
|
22
|
-
this.level = data.attributes.level;
|
|
23
|
-
this.maxLevelBonus = data.attributes.max_level_bonus;
|
|
24
|
-
this.xp = data.attributes.xp;
|
|
25
|
-
this.isSeen = data.attributes.item_seen;
|
|
26
|
-
this.isFavorite = data.attributes.favorite;
|
|
27
|
-
this.isRefundable = data.attributes.refundable;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* The hero's power level.
|
|
31
|
-
* Depends on the tier, level, and rarity value
|
|
32
|
-
*/
|
|
33
|
-
get powerLevel() {
|
|
34
|
-
return (0, Util_1.calcSTWNonSurvivorPowerLevel)(this.rarity, this.level, this.tier);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.default = STWHero;
|
|
38
|
-
//# sourceMappingURL=STWHero.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
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
-
import type { STWProfileHeroLoadoutData } from '../../../resources/httpResponses';
|
|
3
|
-
import type Client from '../../Client';
|
|
4
|
-
/**
|
|
5
|
-
* Represents a Save The World profile's hero loadout
|
|
6
|
-
*/
|
|
7
|
-
declare class STWHeroLoadout extends STWItem {
|
|
8
|
-
/**
|
|
9
|
-
* The loadout's index
|
|
10
|
-
*/
|
|
11
|
-
loadoutIndex: number;
|
|
12
|
-
/**
|
|
13
|
-
* The loadout's team perk ID
|
|
14
|
-
*/
|
|
15
|
-
teamPerk?: string;
|
|
16
|
-
/**
|
|
17
|
-
* The loadout's main hero (commander) ID
|
|
18
|
-
*/
|
|
19
|
-
commanderSlot: string;
|
|
20
|
-
/**
|
|
21
|
-
* The loadout's support hero IDs
|
|
22
|
-
*/
|
|
23
|
-
supportSquad: [
|
|
24
|
-
string | undefined,
|
|
25
|
-
string | undefined,
|
|
26
|
-
string | undefined,
|
|
27
|
-
string | undefined,
|
|
28
|
-
string | undefined
|
|
29
|
-
];
|
|
30
|
-
/**
|
|
31
|
-
* The loadout's gadget IDs
|
|
32
|
-
*/
|
|
33
|
-
gadgets: [
|
|
34
|
-
string | undefined,
|
|
35
|
-
string | undefined
|
|
36
|
-
];
|
|
37
|
-
/**
|
|
38
|
-
* @param client The main client
|
|
39
|
-
* @param id The item ID
|
|
40
|
-
* @param data The loadout data
|
|
41
|
-
*/
|
|
42
|
-
constructor(client: Client, id: string, data: STWProfileHeroLoadoutData);
|
|
43
|
-
}
|
|
44
|
-
export default STWHeroLoadout;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const STWItem_1 = tslib_1.__importDefault(require("./STWItem"));
|
|
5
|
-
/**
|
|
6
|
-
* Represents a Save The World profile's hero loadout
|
|
7
|
-
*/
|
|
8
|
-
class STWHeroLoadout extends STWItem_1.default {
|
|
9
|
-
/**
|
|
10
|
-
* @param client The main client
|
|
11
|
-
* @param id The item ID
|
|
12
|
-
* @param data The loadout data
|
|
13
|
-
*/
|
|
14
|
-
constructor(client, id, data) {
|
|
15
|
-
var _a, _b, _c, _d;
|
|
16
|
-
super(client, id, data);
|
|
17
|
-
this.loadoutIndex = data.attributes.loadout_index;
|
|
18
|
-
this.teamPerk = data.attributes.team_perk !== '' ? data.attributes.team_perk : undefined;
|
|
19
|
-
this.commanderSlot = data.attributes.crew_members.commanderslot;
|
|
20
|
-
this.supportSquad = [
|
|
21
|
-
data.attributes.crew_members.followerslot1 || undefined,
|
|
22
|
-
data.attributes.crew_members.followerslot2 || undefined,
|
|
23
|
-
data.attributes.crew_members.followerslot3 || undefined,
|
|
24
|
-
data.attributes.crew_members.followerslot4 || undefined,
|
|
25
|
-
data.attributes.crew_members.followerslot5 || undefined,
|
|
26
|
-
];
|
|
27
|
-
this.gadgets = [
|
|
28
|
-
(_b = (_a = data.attributes.gadgets) === null || _a === void 0 ? void 0 : _a.find((g) => g.slot_index === 0)) === null || _b === void 0 ? void 0 : _b.gadget,
|
|
29
|
-
(_d = (_c = data.attributes.gadgets) === null || _c === void 0 ? void 0 : _c.find((g) => g.slot_index === 1)) === null || _d === void 0 ? void 0 : _d.gadget,
|
|
30
|
-
];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.default = STWHeroLoadout;
|
|
34
|
-
//# sourceMappingURL=STWHeroLoadout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"STWHeroLoadout.js","sourceRoot":"","sources":["../../../../src/structures/stw/STWHeroLoadout.ts"],"names":[],"mappings":";;;AAAA,gEAAgC;AAIhC;;GAEG;AACH,MAAM,cAAe,SAAQ,iBAAO;IAmClC;;;;OAIG;IACH,YAAY,MAAc,EAAE,EAAU,EAAE,IAA+B;;QACrE,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QAExB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QAElD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;QAEzF,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,aAAa,CAAC;QAEhE,IAAI,CAAC,YAAY,GAAG;YAClB,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,aAAa,IAAI,SAAS;YACvD,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,aAAa,IAAI,SAAS;YACvD,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,aAAa,IAAI,SAAS;YACvD,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,aAAa,IAAI,SAAS;YACvD,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,aAAa,IAAI,SAAS;SACxD,CAAC;QAEF,IAAI,CAAC,OAAO,GAAG;YACb,MAAA,MAAA,IAAI,CAAC,UAAU,CAAC,OAAO,0CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,0CAAE,MAAM;YAChE,MAAA,MAAA,IAAI,CAAC,UAAU,CAAC,OAAO,0CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,0CAAE,MAAM;SACjE,CAAC;IACJ,CAAC;CACF;AAED,kBAAe,cAAc,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import Base from '../../Base';
|
|
2
|
-
import type Client from '../../Client';
|
|
3
|
-
import type { STWProfileItemData } from '../../../resources/httpResponses';
|
|
4
|
-
/**
|
|
5
|
-
* Represents a Save The World profile's item
|
|
6
|
-
*/
|
|
7
|
-
declare class STWItem extends Base {
|
|
8
|
-
/**
|
|
9
|
-
* The item ID
|
|
10
|
-
*/
|
|
11
|
-
id: string;
|
|
12
|
-
/**
|
|
13
|
-
* The item's template ID
|
|
14
|
-
*/
|
|
15
|
-
templateId: string;
|
|
16
|
-
/**
|
|
17
|
-
* The item's quantity
|
|
18
|
-
*/
|
|
19
|
-
quantity: number;
|
|
20
|
-
/**
|
|
21
|
-
* The item's attributes
|
|
22
|
-
*/
|
|
23
|
-
attributes: any;
|
|
24
|
-
/**
|
|
25
|
-
* @param client The main client
|
|
26
|
-
* @param id The item ID
|
|
27
|
-
* @param data The item's data
|
|
28
|
-
*/
|
|
29
|
-
constructor(client: Client, id: string, data: STWProfileItemData);
|
|
30
|
-
}
|
|
31
|
-
export default STWItem;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const Base_1 = tslib_1.__importDefault(require("../../Base"));
|
|
5
|
-
/**
|
|
6
|
-
* Represents a Save The World profile's item
|
|
7
|
-
*/
|
|
8
|
-
class STWItem extends Base_1.default {
|
|
9
|
-
/**
|
|
10
|
-
* @param client The main client
|
|
11
|
-
* @param id The item ID
|
|
12
|
-
* @param data The item's data
|
|
13
|
-
*/
|
|
14
|
-
constructor(client, id, data) {
|
|
15
|
-
super(client);
|
|
16
|
-
this.id = id;
|
|
17
|
-
this.templateId = data.templateId;
|
|
18
|
-
this.quantity = data.quantity;
|
|
19
|
-
this.attributes = data.attributes;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.default = STWItem;
|
|
23
|
-
//# sourceMappingURL=STWItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"STWItem.js","sourceRoot":"","sources":["../../../../src/structures/stw/STWItem.ts"],"names":[],"mappings":";;;AAAA,8DAA8B;AAI9B;;GAEG;AACH,MAAM,OAAQ,SAAQ,cAAI;IAqBxB;;;;OAIG;IACH,YAAY,MAAc,EAAE,EAAU,EAAE,IAAwB;QAC9D,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAClC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACpC,CAAC;CACF;AAED,kBAAe,OAAO,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import STWItem from './STWItem';
|
|
2
|
-
import type Client from '../../Client';
|
|
3
|
-
import type { STWProfileLockerData } from '../../../resources/httpResponses';
|
|
4
|
-
import type { STWLockerBannerData, STWLockerSlotsData } from '../../../resources/structs';
|
|
5
|
-
/**
|
|
6
|
-
* Represents a Save The World profile's locker
|
|
7
|
-
*/
|
|
8
|
-
declare class STWLocker extends STWItem {
|
|
9
|
-
/**
|
|
10
|
-
* The profile's banner data
|
|
11
|
-
*/
|
|
12
|
-
banner: STWLockerBannerData;
|
|
13
|
-
/**
|
|
14
|
-
* The locker's name
|
|
15
|
-
*/
|
|
16
|
-
lockerName?: string;
|
|
17
|
-
/**
|
|
18
|
-
* The amount of times the locker has been used
|
|
19
|
-
*/
|
|
20
|
-
useCount: number;
|
|
21
|
-
/**
|
|
22
|
-
* The locker's slots
|
|
23
|
-
*/
|
|
24
|
-
slots: STWLockerSlotsData;
|
|
25
|
-
/**
|
|
26
|
-
* @param client The main client
|
|
27
|
-
* @param id The item ID
|
|
28
|
-
* @param data The locker data
|
|
29
|
-
*/
|
|
30
|
-
constructor(client: Client, id: string, data: STWProfileLockerData);
|
|
31
|
-
}
|
|
32
|
-
export default STWLocker;
|