gw2e-account-statistics 3.12.0 → 3.13.0
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.
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _aureneLegendaryVariants = require('@gw2efficiency/game-data/skins/categories/aurene-legendary-variants');
|
|
6
|
+
|
|
7
|
+
var _aureneLegendaryVariants2 = _interopRequireDefault(_aureneLegendaryVariants);
|
|
8
|
+
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
|
|
11
|
+
var aureneLegendaryVariantSkinIds = _aureneLegendaryVariants2.default.map(function (x) {
|
|
12
|
+
return x.id;
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
exports.default = aureneLegendaryVariantSkinIds;
|
|
@@ -34,7 +34,8 @@ exports.default = function (accountData, extraInformation) {
|
|
|
34
34
|
nightfury: skinExists(accountData, 6161),
|
|
35
35
|
_fractalRelicsFromTitles: fractalRelicsFromTitles(accountData),
|
|
36
36
|
_pristineFractalRelicsFromTitles: pristineFractalRelicsFromTitles(accountData),
|
|
37
|
-
_unstableFractalEssenceFromUnlocks: unstableFractalEssenceFromUnlocks(accountData)
|
|
37
|
+
_unstableFractalEssenceFromUnlocks: unstableFractalEssenceFromUnlocks(accountData),
|
|
38
|
+
aureneLegendaryVariantSkins: aureneLegendaryVariantSkins(accountData)
|
|
38
39
|
};
|
|
39
40
|
};
|
|
40
41
|
|
|
@@ -54,6 +55,10 @@ var _abyssalFractalWeapons = require('../static/abyssalFractalWeapons');
|
|
|
54
55
|
|
|
55
56
|
var _abyssalFractalWeapons2 = _interopRequireDefault(_abyssalFractalWeapons);
|
|
56
57
|
|
|
58
|
+
var _aureneLegendaryVariants = require('../gameData/aureneLegendaryVariants');
|
|
59
|
+
|
|
60
|
+
var _aureneLegendaryVariants2 = _interopRequireDefault(_aureneLegendaryVariants);
|
|
61
|
+
|
|
57
62
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
58
63
|
|
|
59
64
|
// The unlocked dyes on the account
|
|
@@ -251,7 +256,7 @@ function fractalSkins(accountData) {
|
|
|
251
256
|
}).length;
|
|
252
257
|
}
|
|
253
258
|
|
|
254
|
-
// The
|
|
259
|
+
// The immortal weapon skins unlocked on the account
|
|
255
260
|
function immortalSkins(accountData) {
|
|
256
261
|
if (!accountData.skins) {
|
|
257
262
|
return null;
|
|
@@ -262,6 +267,17 @@ function immortalSkins(accountData) {
|
|
|
262
267
|
}).length;
|
|
263
268
|
}
|
|
264
269
|
|
|
270
|
+
// The aurene legendary variant skins unlocked on the account
|
|
271
|
+
function aureneLegendaryVariantSkins(accountData) {
|
|
272
|
+
if (!accountData.skins) {
|
|
273
|
+
return null;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
return accountData.skins.filter(function (x) {
|
|
277
|
+
return _aureneLegendaryVariants2.default.indexOf(x) !== -1;
|
|
278
|
+
}).length;
|
|
279
|
+
}
|
|
280
|
+
|
|
265
281
|
// Check if a skin exists on the account
|
|
266
282
|
function skinExists(accountData, id) {
|
|
267
283
|
if (!accountData.skins) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gw2e-account-statistics",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"description": "Calculate statistics of guildwars2 accounts",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"mockdate": "^2.0.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@gw2efficiency/game-data": "^0.1.
|
|
22
|
+
"@gw2efficiency/game-data": "^0.1.38",
|
|
23
23
|
"array-unique": "^0.3.2",
|
|
24
24
|
"gw2e-account-value": "^3.13.1",
|
|
25
25
|
"gw2e-static-data": "^0.5.7",
|
package/tests/unlocks.spec.js
CHANGED
|
@@ -248,4 +248,11 @@ describe('statistics > unlocks', () => {
|
|
|
248
248
|
expect(unlocksStatistics({skins: [1, 2], novelties: [1, 2]}, EXTRA_INFO)._unstableFractalEssenceFromUnlocks).to.equal(0)
|
|
249
249
|
expect(unlocksStatistics({skins: [9607, 9603], novelties: [141]}, EXTRA_INFO)._unstableFractalEssenceFromUnlocks).to.equal(2 * 480 + 450)
|
|
250
250
|
})
|
|
251
|
+
|
|
252
|
+
it('can calculate aurene legendary variant skin count', () => {
|
|
253
|
+
expect(unlocksStatistics({}, EXTRA_INFO).aureneLegendaryVariantSkins).to.equal(null)
|
|
254
|
+
expect(unlocksStatistics({ skins: [] }, EXTRA_INFO).aureneLegendaryVariantSkins).to.equal(0)
|
|
255
|
+
expect(unlocksStatistics({ skins: [1, 2, 7, 9, 10] }, EXTRA_INFO).aureneLegendaryVariantSkins).to.equal(0)
|
|
256
|
+
expect(unlocksStatistics({ skins: [1, 2, 10515, 10739] }, EXTRA_INFO).aureneLegendaryVariantSkins).to.equal(2)
|
|
257
|
+
})
|
|
251
258
|
})
|