gw2e-account-statistics 3.15.1 → 3.15.2
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 _suffusedObsidianArmors = require('@gw2efficiency/game-data/skins/categories/suffused-obsidian-armors');
|
|
6
|
+
|
|
7
|
+
var _suffusedObsidianArmors2 = _interopRequireDefault(_suffusedObsidianArmors);
|
|
8
|
+
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
|
|
11
|
+
var suffusedObsidianArmorSkinIds = _suffusedObsidianArmors2.default.map(function (x) {
|
|
12
|
+
return x.id;
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
exports.default = suffusedObsidianArmorSkinIds;
|
|
@@ -35,7 +35,8 @@ exports.default = function (accountData, extraInformation) {
|
|
|
35
35
|
_fractalRelicsFromTitles: fractalRelicsFromTitles(accountData),
|
|
36
36
|
_pristineFractalRelicsFromTitles: pristineFractalRelicsFromTitles(accountData),
|
|
37
37
|
_unstableFractalEssenceFromUnlocks: unstableFractalEssenceFromUnlocks(accountData),
|
|
38
|
-
aureneLegendaryVariantSkins: aureneLegendaryVariantSkins(accountData)
|
|
38
|
+
aureneLegendaryVariantSkins: aureneLegendaryVariantSkins(accountData),
|
|
39
|
+
suffusedObsidianArmorSkins: suffusedObsidianArmorSkins(accountData)
|
|
39
40
|
};
|
|
40
41
|
};
|
|
41
42
|
|
|
@@ -59,6 +60,10 @@ var _aureneLegendaryVariants = require('../gameData/aureneLegendaryVariants');
|
|
|
59
60
|
|
|
60
61
|
var _aureneLegendaryVariants2 = _interopRequireDefault(_aureneLegendaryVariants);
|
|
61
62
|
|
|
63
|
+
var _suffusedObsidianArmors = require('../gameData/suffusedObsidianArmors');
|
|
64
|
+
|
|
65
|
+
var _suffusedObsidianArmors2 = _interopRequireDefault(_suffusedObsidianArmors);
|
|
66
|
+
|
|
62
67
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
63
68
|
|
|
64
69
|
// The unlocked dyes on the account
|
|
@@ -278,6 +283,17 @@ function aureneLegendaryVariantSkins(accountData) {
|
|
|
278
283
|
}).length;
|
|
279
284
|
}
|
|
280
285
|
|
|
286
|
+
// The suffused obsidian armor skins unlocked on the account ignoring slumbering versions
|
|
287
|
+
function suffusedObsidianArmorSkins(accountData) {
|
|
288
|
+
if (!accountData.skins) {
|
|
289
|
+
return null;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
return accountData.skins.filter(function (x) {
|
|
293
|
+
return _suffusedObsidianArmors2.default.indexOf(x) !== -1;
|
|
294
|
+
}).length;
|
|
295
|
+
}
|
|
296
|
+
|
|
281
297
|
// Check if a skin exists on the account
|
|
282
298
|
function skinExists(accountData, id) {
|
|
283
299
|
if (!accountData.skins) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gw2e-account-statistics",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.2",
|
|
4
4
|
"description": "Calculate statistics of guildwars2 accounts",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"mockdate": "^2.0.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@gw2efficiency/game-data": "^0.1.
|
|
22
|
+
"@gw2efficiency/game-data": "^0.1.43",
|
|
23
23
|
"array-unique": "^0.3.2",
|
|
24
24
|
"gw2e-account-value": "^3.13.1",
|
|
25
|
-
"gw2e-static-data": "^0.5.
|
|
25
|
+
"gw2e-static-data": "^0.5.32",
|
|
26
26
|
"round-to": "^3.0.0",
|
|
27
27
|
"sum-by": "^1.0.0"
|
|
28
28
|
}
|
package/tests/unlocks.spec.js
CHANGED
|
@@ -255,4 +255,11 @@ describe('statistics > unlocks', () => {
|
|
|
255
255
|
expect(unlocksStatistics({ skins: [1, 2, 7, 9, 10] }, EXTRA_INFO).aureneLegendaryVariantSkins).to.equal(0)
|
|
256
256
|
expect(unlocksStatistics({ skins: [1, 2, 10515, 10739] }, EXTRA_INFO).aureneLegendaryVariantSkins).to.equal(2)
|
|
257
257
|
})
|
|
258
|
+
|
|
259
|
+
it('can calculate suffused obsidian armor skin count', () => {
|
|
260
|
+
expect(unlocksStatistics({}, EXTRA_INFO).suffusedObsidianArmorSkins).to.equal(null)
|
|
261
|
+
expect(unlocksStatistics({ skins: [] }, EXTRA_INFO).suffusedObsidianArmorSkins).to.equal(0)
|
|
262
|
+
expect(unlocksStatistics({ skins: [1, 2, 7, 9, 10] }, EXTRA_INFO).suffusedObsidianArmorSkins).to.equal(0)
|
|
263
|
+
expect(unlocksStatistics({ skins: [1, 2, 12171, 12136] }, EXTRA_INFO).suffusedObsidianArmorSkins).to.equal(2)
|
|
264
|
+
})
|
|
258
265
|
})
|