lol-constants 2.8.0 → 2.9.1

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Provides constants and types for League of Legends related stuff within the context of [Riot APIs](https://developer.riotgames.com/docs/lol). Types such as [`ChampionId`](src/core/constants/Champions/ChampionIds.ts), [`ChampionName`](src/core/constants/Champions/ChampionNames.ts), [`ItemKey`](src/core/constants/Items/ItemKeys.ts), [`RuneId`](src/core/constants/Runes/RuneSetsByRuneNames.ts#L55), [`SpellName`](src/core/constants/Spells/SpellNames.ts), [`Position`](src/core/constants/Positions.ts), [`Queue`](src/core/constants/Queues.ts), [`RankedTier`](src/core/constants/RankedTiers.ts), [`Region`](src/core/constants/Regions.ts) and more are provided. Certain URLs and URIs are available as constants as well in [`DataDragonUrls`](src/core/constants/DataDragonUrls.ts), [`PlatformApiUris`](src/core/constants/PlatformApiUris.ts), [`RegionalApiUris`](src/core/constants/RegionalApiUris.ts).
1
+ Provides constants and types for League of Legends related stuff within the context of [Riot APIs](https://developer.riotgames.com/docs/lol). Types such as [`ChampionId`](src/core/constants/Champions/ChampionIds.ts), [`ChampionName`](src/core/constants/Champions/ChampionNames.ts), [`ItemKey`](src/core/constants/Items/ItemKeys.ts), [`RuneId`](src/core/constants/Runes/RuneSetsByRuneNames.ts#L55), [`SpellName`](src/core/constants/Spells/SpellNames.ts), [`Position`](src/core/constants/Positions.ts), [`QueueType`](src/core/constants/QueueTypes.ts), [`RankedTier`](src/core/constants/RankedTiers.ts), [`Region`](src/core/constants/Regions.ts) and more are provided. Certain URLs and URIs are available as constants as well in [`DataDragonUrls`](src/core/constants/DataDragonUrls.ts), [`PlatformApiUris`](src/core/constants/PlatformApiUris.ts), [`RegionalApiUris`](src/core/constants/RegionalApiUris.ts).
2
2
 
3
3
  Advantages:
4
4
  - Four categories — champions, items, runes, summoner spells — are armed with getter functions that exchange between id–key–name such as [`getChampionNameByKey`](src/core/helpers/Champions/getChampionNameByKey.ts)–[`getChampionIdByName`](src/core/helpers/Champions/getChampionIdByName.ts)–[`getChampionKeyById`](src/core/helpers/Champions/getChampionKeyById.ts)
@@ -33,5 +33,5 @@ exports.MythicItemNames = [
33
33
  'Heartsteel',
34
34
  'Rod of Ages',
35
35
  'Youmuu\'s Ghostblade',
36
- ...OrnnItemNames_1.OrnnItems,
36
+ ...OrnnItemNames_1.OrnnItemNames,
37
37
  ];
@@ -1 +1 @@
1
- export declare const OrnnItems: readonly ["Cry of the Shrieking City", "Ceaseless Hunger", "Caesura", "Draktharr's Shadowcarver", "Deicide", "Dreamshatter", "Equinox", "Edge of Finality", "Eye of Luden", "Eternal Winter", "Frozen Fist", "Flicker", "Infinite Convergence", "Icathia's Curse", "Infinity Force", "Leviathan", "Liandry's Lament", "Primordial Dawn", "Reliquary of the Golden Dawn", "Syzygy", "Shurelya's Requiem", "Starcaster", "Seething Sorrow", "The Unspoken Parasite", "Typhoon", "Upgraded Aeropack", "Vespertide", "Youmuu's Wake"];
1
+ export declare const OrnnItemNames: readonly ["Cry of the Shrieking City", "Ceaseless Hunger", "Caesura", "Draktharr's Shadowcarver", "Deicide", "Dreamshatter", "Equinox", "Edge of Finality", "Eye of Luden", "Eternal Winter", "Frozen Fist", "Flicker", "Infinite Convergence", "Icathia's Curse", "Infinity Force", "Leviathan", "Liandry's Lament", "Primordial Dawn", "Reliquary of the Golden Dawn", "Syzygy", "Shurelya's Requiem", "Starcaster", "Seething Sorrow", "The Unspoken Parasite", "Typhoon", "Upgraded Aeropack", "Vespertide", "Youmuu's Wake"];
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OrnnItems = void 0;
4
- exports.OrnnItems = [
3
+ exports.OrnnItemNames = void 0;
4
+ exports.OrnnItemNames = [
5
5
  'Cry of the Shrieking City',
6
6
  'Ceaseless Hunger',
7
7
  'Caesura',
@@ -4,6 +4,7 @@ const BootsItemNames_1 = require("../constants/BootsItemNames");
4
4
  const Item_1 = require("../constants/Item");
5
5
  const LegendaryItemNames_1 = require("../constants/LegendaryItemNames");
6
6
  const MythicItemNames_1 = require("../constants/MythicItemNames");
7
+ const OrnnItemNames_1 = require("../constants/OrnnItemNames");
7
8
  const validateNumber_1 = require("./helpers/validateNumber");
8
9
  const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
9
10
  (async () => {
@@ -11,6 +12,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
11
12
  mythic: {},
12
13
  legendary: {},
13
14
  boots: {},
15
+ ornn: {},
14
16
  };
15
17
  // Add Mythic Items
16
18
  for (const mythicItemName of MythicItemNames_1.MythicItemNames) {
@@ -42,6 +44,16 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
42
44
  }
43
45
  }
44
46
  }
47
+ // Add Ornn Items
48
+ for (const itemName of OrnnItemNames_1.OrnnItemNames) {
49
+ let itemKey;
50
+ for (itemKey in Item_1.Item.data) {
51
+ const itemData = Item_1.Item.data[itemKey];
52
+ if (itemData.name == itemName) {
53
+ itemKeys.ornn[itemData.name] = (0, validateNumber_1.validateNumber)(itemKey, 'ornn-itemKey');
54
+ }
55
+ }
56
+ }
45
57
  (0, writeToTmpFile_1.writeToTmpFile)('MythicItemKeysNum', {
46
58
  constName: 'MythicItemKeysNum',
47
59
  typeName: 'MythicItemKeyNum',
@@ -57,4 +69,9 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
57
69
  typeName: 'BootsItemKeyNum',
58
70
  json: itemKeys.boots,
59
71
  });
72
+ (0, writeToTmpFile_1.writeToTmpFile)('OrnnItemKeysNum', {
73
+ constName: 'OrnnItemKeysNum',
74
+ typeName: 'OrnnItemKeyNum',
75
+ json: itemKeys.ornn,
76
+ });
60
77
  })();
@@ -4,12 +4,14 @@ const BootsItemNames_1 = require("../constants/BootsItemNames");
4
4
  const Item_1 = require("../constants/Item");
5
5
  const LegendaryItemNames_1 = require("../constants/LegendaryItemNames");
6
6
  const MythicItemNames_1 = require("../constants/MythicItemNames");
7
+ const OrnnItemNames_1 = require("../constants/OrnnItemNames");
7
8
  const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
8
9
  (async () => {
9
10
  const itemKeys = {
10
11
  mythic: {},
11
12
  legendary: {},
12
13
  boots: {},
14
+ ornn: {},
13
15
  };
14
16
  // Add Mythic Items
15
17
  for (const mythicItemName of MythicItemNames_1.MythicItemNames) {
@@ -41,6 +43,16 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
41
43
  }
42
44
  }
43
45
  }
46
+ // Add Ornn Items
47
+ for (const itemName of OrnnItemNames_1.OrnnItemNames) {
48
+ let itemKey;
49
+ for (itemKey in Item_1.Item.data) {
50
+ const itemData = Item_1.Item.data[itemKey];
51
+ if (itemData.name == itemName) {
52
+ itemKeys.ornn[itemData.name] = itemKey;
53
+ }
54
+ }
55
+ }
44
56
  (0, writeToTmpFile_1.writeToTmpFile)('MythicItemKeys', {
45
57
  constName: 'MythicItemKeys',
46
58
  includeAutoTypeName: true,
@@ -56,6 +68,11 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
56
68
  includeAutoTypeName: true,
57
69
  json: itemKeys.boots,
58
70
  });
71
+ (0, writeToTmpFile_1.writeToTmpFile)('OrnnItemKeys', {
72
+ constName: 'OrnnItemKeys',
73
+ includeAutoTypeName: true,
74
+ json: itemKeys.ornn,
75
+ });
59
76
  let m = Object.values(itemKeys.mythic).length;
60
77
  let l = Object.values(itemKeys.legendary).length;
61
78
  let b = Object.values(itemKeys.boots).length;
@@ -4,12 +4,14 @@ const BootsItemNames_1 = require("../constants/BootsItemNames");
4
4
  const Item_1 = require("../constants/Item");
5
5
  const LegendaryItemNames_1 = require("../constants/LegendaryItemNames");
6
6
  const MythicItemNames_1 = require("../constants/MythicItemNames");
7
+ const OrnnItemNames_1 = require("../constants/OrnnItemNames");
7
8
  const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
8
9
  (async () => {
9
10
  const itemNames = {
10
11
  mythic: {},
11
12
  legendary: {},
12
13
  boots: {},
14
+ ornn: {},
13
15
  };
14
16
  // Add Mythic Items
15
17
  for (const mythicItemName of MythicItemNames_1.MythicItemNames) {
@@ -41,6 +43,16 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
41
43
  }
42
44
  }
43
45
  }
46
+ // Add Ornn Items
47
+ for (const itemName of OrnnItemNames_1.OrnnItemNames) {
48
+ let itemKey;
49
+ for (itemKey in Item_1.Item.data) {
50
+ const itemData = Item_1.Item.data[itemKey];
51
+ if (itemData.name == itemName) {
52
+ itemNames.ornn[itemKey] = itemData.name;
53
+ }
54
+ }
55
+ }
44
56
  (0, writeToTmpFile_1.writeToTmpFile)('MythicItemNames', {
45
57
  constName: 'MythicItemNames',
46
58
  includeAutoTypeName: true,
@@ -56,4 +68,9 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
56
68
  includeAutoTypeName: true,
57
69
  json: itemNames.boots,
58
70
  });
71
+ (0, writeToTmpFile_1.writeToTmpFile)('OrnnItemNames', {
72
+ constName: 'OrnnItemNames',
73
+ includeAutoTypeName: true,
74
+ json: itemNames.ornn,
75
+ });
59
76
  })();
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DataDragonUrls = void 0;
4
- const version = '13.15.1';
5
- const cdragonVersion = '13.15';
4
+ const version = '13.17.1';
5
+ const cdragonVersion = '13.17';
6
6
  const base = `https://ddragon.leagueoflegends.com/cdn/${version}`;
7
7
  const cdragonBase = `https://raw.communitydragon.org/${cdragonVersion}`;
8
8
  const locale = 'en_US';
@@ -0,0 +1,31 @@
1
+ export declare const OrnnItemKeys: {
2
+ readonly "Cry of the Shrieking City": "227033";
3
+ readonly "Ceaseless Hunger": "227015";
4
+ readonly Caesura: "227024";
5
+ readonly "Draktharr's Shadowcarver": "227002";
6
+ readonly Deicide: "227017";
7
+ readonly Dreamshatter: "227016";
8
+ readonly Equinox: "227023";
9
+ readonly "Edge of Finality": "227031";
10
+ readonly "Eye of Luden": "227013";
11
+ readonly "Eternal Winter": "227014";
12
+ readonly "Frozen Fist": "227005";
13
+ readonly Flicker: "227032";
14
+ readonly "Infinite Convergence": "227028";
15
+ readonly "Icathia's Curse": "227009";
16
+ readonly "Infinity Force": "227018";
17
+ readonly Leviathan: "227025";
18
+ readonly "Liandry's Lament": "227012";
19
+ readonly "Primordial Dawn": "227027";
20
+ readonly "Reliquary of the Golden Dawn": "227019";
21
+ readonly Syzygy: "227001";
22
+ readonly "Shurelya's Requiem": "227020";
23
+ readonly Starcaster: "227021";
24
+ readonly "Seething Sorrow": "227030";
25
+ readonly "The Unspoken Parasite": "227026";
26
+ readonly Typhoon: "227006";
27
+ readonly "Upgraded Aeropack": "227011";
28
+ readonly Vespertide: "227010";
29
+ readonly "Youmuu's Wake": "227029";
30
+ };
31
+ export type OrnnItemKey = typeof OrnnItemKeys[keyof typeof OrnnItemKeys];
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrnnItemKeys = void 0;
4
+ exports.OrnnItemKeys = { "Cry of the Shrieking City": "227033", "Ceaseless Hunger": "227015", "Caesura": "227024", "Draktharr's Shadowcarver": "227002", "Deicide": "227017", "Dreamshatter": "227016", "Equinox": "227023", "Edge of Finality": "227031", "Eye of Luden": "227013", "Eternal Winter": "227014", "Frozen Fist": "227005", "Flicker": "227032", "Infinite Convergence": "227028", "Icathia's Curse": "227009", "Infinity Force": "227018", "Leviathan": "227025", "Liandry's Lament": "227012", "Primordial Dawn": "227027", "Reliquary of the Golden Dawn": "227019", "Syzygy": "227001", "Shurelya's Requiem": "227020", "Starcaster": "227021", "Seething Sorrow": "227030", "The Unspoken Parasite": "227026", "Typhoon": "227006", "Upgraded Aeropack": "227011", "Vespertide": "227010", "Youmuu's Wake": "227029" };
@@ -0,0 +1,31 @@
1
+ export declare const OrnnItemKeysNum: {
2
+ readonly "Cry of the Shrieking City": 227033;
3
+ readonly "Ceaseless Hunger": 227015;
4
+ readonly Caesura: 227024;
5
+ readonly "Draktharr's Shadowcarver": 227002;
6
+ readonly Deicide: 227017;
7
+ readonly Dreamshatter: 227016;
8
+ readonly Equinox: 227023;
9
+ readonly "Edge of Finality": 227031;
10
+ readonly "Eye of Luden": 227013;
11
+ readonly "Eternal Winter": 227014;
12
+ readonly "Frozen Fist": 227005;
13
+ readonly Flicker: 227032;
14
+ readonly "Infinite Convergence": 227028;
15
+ readonly "Icathia's Curse": 227009;
16
+ readonly "Infinity Force": 227018;
17
+ readonly Leviathan: 227025;
18
+ readonly "Liandry's Lament": 227012;
19
+ readonly "Primordial Dawn": 227027;
20
+ readonly "Reliquary of the Golden Dawn": 227019;
21
+ readonly Syzygy: 227001;
22
+ readonly "Shurelya's Requiem": 227020;
23
+ readonly Starcaster: 227021;
24
+ readonly "Seething Sorrow": 227030;
25
+ readonly "The Unspoken Parasite": 227026;
26
+ readonly Typhoon: 227006;
27
+ readonly "Upgraded Aeropack": 227011;
28
+ readonly Vespertide: 227010;
29
+ readonly "Youmuu's Wake": 227029;
30
+ };
31
+ export type OrnnItemKeyNum = typeof OrnnItemKeysNum[keyof typeof OrnnItemKeysNum];
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrnnItemKeysNum = void 0;
4
+ exports.OrnnItemKeysNum = { "Cry of the Shrieking City": 227033, "Ceaseless Hunger": 227015, "Caesura": 227024, "Draktharr's Shadowcarver": 227002, "Deicide": 227017, "Dreamshatter": 227016, "Equinox": 227023, "Edge of Finality": 227031, "Eye of Luden": 227013, "Eternal Winter": 227014, "Frozen Fist": 227005, "Flicker": 227032, "Infinite Convergence": 227028, "Icathia's Curse": 227009, "Infinity Force": 227018, "Leviathan": 227025, "Liandry's Lament": 227012, "Primordial Dawn": 227027, "Reliquary of the Golden Dawn": 227019, "Syzygy": 227001, "Shurelya's Requiem": 227020, "Starcaster": 227021, "Seething Sorrow": 227030, "The Unspoken Parasite": 227026, "Typhoon": 227006, "Upgraded Aeropack": 227011, "Vespertide": 227010, "Youmuu's Wake": 227029 };
@@ -0,0 +1,59 @@
1
+ export declare const OrnnItemNames: {
2
+ readonly "7001": "Syzygy";
3
+ readonly "7002": "Draktharr's Shadowcarver";
4
+ readonly "7005": "Frozen Fist";
5
+ readonly "7006": "Typhoon";
6
+ readonly "7009": "Icathia's Curse";
7
+ readonly "7010": "Vespertide";
8
+ readonly "7011": "Upgraded Aeropack";
9
+ readonly "7012": "Liandry's Lament";
10
+ readonly "7013": "Eye of Luden";
11
+ readonly "7014": "Eternal Winter";
12
+ readonly "7015": "Ceaseless Hunger";
13
+ readonly "7016": "Dreamshatter";
14
+ readonly "7017": "Deicide";
15
+ readonly "7018": "Infinity Force";
16
+ readonly "7019": "Reliquary of the Golden Dawn";
17
+ readonly "7020": "Shurelya's Requiem";
18
+ readonly "7021": "Starcaster";
19
+ readonly "7023": "Equinox";
20
+ readonly "7024": "Caesura";
21
+ readonly "7025": "Leviathan";
22
+ readonly "7026": "The Unspoken Parasite";
23
+ readonly "7027": "Primordial Dawn";
24
+ readonly "7028": "Infinite Convergence";
25
+ readonly "7029": "Youmuu's Wake";
26
+ readonly "7030": "Seething Sorrow";
27
+ readonly "7031": "Edge of Finality";
28
+ readonly "7032": "Flicker";
29
+ readonly "7033": "Cry of the Shrieking City";
30
+ readonly "227001": "Syzygy";
31
+ readonly "227002": "Draktharr's Shadowcarver";
32
+ readonly "227005": "Frozen Fist";
33
+ readonly "227006": "Typhoon";
34
+ readonly "227009": "Icathia's Curse";
35
+ readonly "227010": "Vespertide";
36
+ readonly "227011": "Upgraded Aeropack";
37
+ readonly "227012": "Liandry's Lament";
38
+ readonly "227013": "Eye of Luden";
39
+ readonly "227014": "Eternal Winter";
40
+ readonly "227015": "Ceaseless Hunger";
41
+ readonly "227016": "Dreamshatter";
42
+ readonly "227017": "Deicide";
43
+ readonly "227018": "Infinity Force";
44
+ readonly "227019": "Reliquary of the Golden Dawn";
45
+ readonly "227020": "Shurelya's Requiem";
46
+ readonly "227021": "Starcaster";
47
+ readonly "227023": "Equinox";
48
+ readonly "227024": "Caesura";
49
+ readonly "227025": "Leviathan";
50
+ readonly "227026": "The Unspoken Parasite";
51
+ readonly "227027": "Primordial Dawn";
52
+ readonly "227028": "Infinite Convergence";
53
+ readonly "227029": "Youmuu's Wake";
54
+ readonly "227030": "Seething Sorrow";
55
+ readonly "227031": "Edge of Finality";
56
+ readonly "227032": "Flicker";
57
+ readonly "227033": "Cry of the Shrieking City";
58
+ };
59
+ export type OrnnItemName = typeof OrnnItemNames[keyof typeof OrnnItemNames];
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrnnItemNames = void 0;
4
+ exports.OrnnItemNames = { "7001": "Syzygy", "7002": "Draktharr's Shadowcarver", "7005": "Frozen Fist", "7006": "Typhoon", "7009": "Icathia's Curse", "7010": "Vespertide", "7011": "Upgraded Aeropack", "7012": "Liandry's Lament", "7013": "Eye of Luden", "7014": "Eternal Winter", "7015": "Ceaseless Hunger", "7016": "Dreamshatter", "7017": "Deicide", "7018": "Infinity Force", "7019": "Reliquary of the Golden Dawn", "7020": "Shurelya's Requiem", "7021": "Starcaster", "7023": "Equinox", "7024": "Caesura", "7025": "Leviathan", "7026": "The Unspoken Parasite", "7027": "Primordial Dawn", "7028": "Infinite Convergence", "7029": "Youmuu's Wake", "7030": "Seething Sorrow", "7031": "Edge of Finality", "7032": "Flicker", "7033": "Cry of the Shrieking City", "227001": "Syzygy", "227002": "Draktharr's Shadowcarver", "227005": "Frozen Fist", "227006": "Typhoon", "227009": "Icathia's Curse", "227010": "Vespertide", "227011": "Upgraded Aeropack", "227012": "Liandry's Lament", "227013": "Eye of Luden", "227014": "Eternal Winter", "227015": "Ceaseless Hunger", "227016": "Dreamshatter", "227017": "Deicide", "227018": "Infinity Force", "227019": "Reliquary of the Golden Dawn", "227020": "Shurelya's Requiem", "227021": "Starcaster", "227023": "Equinox", "227024": "Caesura", "227025": "Leviathan", "227026": "The Unspoken Parasite", "227027": "Primordial Dawn", "227028": "Infinite Convergence", "227029": "Youmuu's Wake", "227030": "Seething Sorrow", "227031": "Edge of Finality", "227032": "Flicker", "227033": "Cry of the Shrieking City" };
@@ -0,0 +1,7 @@
1
+ export declare const QueueTypes: {
2
+ readonly RANKED_SOLO_5x5: "RANKED_SOLO_5x5";
3
+ readonly RANKED_FLEX_SR: "RANKED_FLEX_SR";
4
+ readonly RANKED_TFT: "RANKED_TFT";
5
+ };
6
+ export type QueueType = typeof QueueTypes[keyof typeof QueueTypes];
7
+ export declare function isQueueType(value: any): value is QueueType;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isQueueType = exports.QueueTypes = void 0;
4
+ exports.QueueTypes = {
5
+ 'RANKED_SOLO_5x5': 'RANKED_SOLO_5x5',
6
+ 'RANKED_FLEX_SR': 'RANKED_FLEX_SR',
7
+ 'RANKED_TFT': 'RANKED_TFT',
8
+ };
9
+ function isQueueType(value) {
10
+ return typeof value == 'string' && value in exports.QueueTypes;
11
+ }
12
+ exports.isQueueType = isQueueType;
@@ -1,7 +1,7 @@
1
1
  import { RuneName } from './RuneSets';
2
2
  import { RuneTreeName } from './RuneTreeNames';
3
3
  /**
4
- * The file names themselves of runes,
4
+ * The file names themselves for runes,
5
5
  * according to https://raw.communitydragon.org.
6
6
  * The file names are excluding the extension (`.png`).
7
7
  *
@@ -9,5 +9,6 @@ import { RuneTreeName } from './RuneTreeNames';
9
9
  * @see https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/v1/perk-images/styles/
10
10
  */
11
11
  export declare const RuneIconFileNames: {
12
- readonly [k in (RuneName | RuneTreeName)]: string;
12
+ readonly [k in RuneIconFile]: string;
13
13
  };
14
+ export type RuneIconFile = RuneName | RuneTreeName | 'runesicon';
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RuneIconFileNames = void 0;
4
4
  /**
5
- * The file names themselves of runes,
5
+ * The file names themselves for runes,
6
6
  * according to https://raw.communitydragon.org.
7
7
  * The file names are excluding the extension (`.png`).
8
8
  *
@@ -16,7 +16,7 @@ exports.RuneIconFileNames = {
16
16
  'Sorcery': '7202_sorcery',
17
17
  'Resolve': '7204_resolve',
18
18
  'Inspiration': '7203_whimsy',
19
- // ## Tree Runes
19
+ // ## Runes
20
20
  // ### Precision
21
21
  'Conqueror': 'conqueror',
22
22
  'Coup de Grace': 'coupdegrace',
@@ -93,9 +93,11 @@ exports.RuneIconFileNames = {
93
93
  // ###
94
94
  'Flex (AF)': 'statmodsadaptiveforceicon',
95
95
  'Flex (AR)': 'statmodsarmoricon',
96
- 'Flex (MR)': 'statmodsmagicresicon.magicresist_fix',
96
+ 'Flex (MR)': 'statmodsmagicresicon',
97
97
  // ###
98
98
  'Defense (HP)': 'statmodshealthscalingicon',
99
99
  'Defense (AR)': 'statmodsarmoricon',
100
- 'Defense (MR)': 'statmodsmagicresicon.magicresist_fix',
100
+ 'Defense (MR)': 'statmodsmagicresicon',
101
+ // ## Misc.
102
+ runesicon: 'runesicon',
101
103
  };
@@ -0,0 +1,2 @@
1
+ import { OrnnItemKey } from '../../constants/Items/OrnnItemKeys';
2
+ export declare function isOrnnItemKey(value: string): value is OrnnItemKey;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isOrnnItemKey = void 0;
4
+ const OrnnItemNames_1 = require("../../constants/Items/OrnnItemNames");
5
+ function isOrnnItemKey(value) {
6
+ return value in OrnnItemNames_1.OrnnItemNames;
7
+ }
8
+ exports.isOrnnItemKey = isOrnnItemKey;
@@ -0,0 +1,2 @@
1
+ import { OrnnItemKeyNum } from '../../constants/Items/OrnnItemKeysNum';
2
+ export declare function isOrnnItemKeyNum(value: number): value is OrnnItemKeyNum;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isOrnnItemKeyNum = void 0;
4
+ const OrnnItemNames_1 = require("../../constants/Items/OrnnItemNames");
5
+ function isOrnnItemKeyNum(value) {
6
+ return value in OrnnItemNames_1.OrnnItemNames;
7
+ }
8
+ exports.isOrnnItemKeyNum = isOrnnItemKeyNum;
@@ -0,0 +1,2 @@
1
+ import { OrnnItemName } from '../../constants/Items/OrnnItemNames';
2
+ export declare function isOrnnItemName(value: any): value is OrnnItemName;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isOrnnItemName = void 0;
4
+ const OrnnItemKeys_1 = require("../../constants/Items/OrnnItemKeys");
5
+ function isOrnnItemName(value) {
6
+ return typeof value == 'string' && value in OrnnItemKeys_1.OrnnItemKeys;
7
+ }
8
+ exports.isOrnnItemName = isOrnnItemName;
@@ -1,3 +1,3 @@
1
1
  import { RuneName } from '../../constants/Runes/RuneSets';
2
2
  import { RuneTreeName } from '../../constants/Runes/RuneTreeNames';
3
- export declare function getRuneCdnUrl(name: RuneName | RuneTreeName): string;
3
+ export declare function getRuneCdnUrl(name: (RuneName | RuneTreeName | 'runesicon')): string;
@@ -7,6 +7,8 @@ const RuneTreeNames_1 = require("../../constants/Runes/RuneTreeNames");
7
7
  const getRuneCategoryName_1 = require("./getRuneCategoryName");
8
8
  const isStatRuneName_1 = require("./isStatRuneName");
9
9
  function getRuneCdnUrl(name) {
10
+ if (name == 'runesicon')
11
+ return `${DataDragonUrls_1.DataDragonUrls.TREE_RUNE_ICON_BASE}/${RuneIconFileNames_1.RuneIconFileNames[name]}.png`;
10
12
  // Choose the appropriate base path
11
13
  const base = (0, isStatRuneName_1.isStatRuneName)(name)
12
14
  ? DataDragonUrls_1.DataDragonUrls.STAT_RUNE_ICON_BASE
@@ -21,7 +23,7 @@ function getRuneCdnUrl(name) {
21
23
  let category = (0, getRuneCategoryName_1.getRuneCategoryName)(name);
22
24
  // Remove spaces, colons, apostrophes and make lowercase
23
25
  let runeTreeFolder = category.replaceAll(' ', '').toLowerCase();
24
- let runeFolder = name.replaceAll(/[:']/g, '').toLowerCase();
26
+ let runeFolder = name.replaceAll(/[:' ]/g, '').toLowerCase();
25
27
  // Some runes, for whatever reason, are displaced and badly organized.
26
28
  // Therefore we are going to add special cases to these runes.
27
29
  switch (name) {
@@ -43,6 +45,7 @@ function getRuneCdnUrl(name) {
43
45
  break;
44
46
  case 'Approach Velocity':
45
47
  runeTreeFolder = 'resolve';
48
+ break;
46
49
  }
47
50
  return `${base}/${runeTreeFolder}/${runeFolder}/${RuneIconFileNames_1.RuneIconFileNames[name]}.png`;
48
51
  }
package/core/index.d.ts CHANGED
@@ -17,7 +17,7 @@ export * from './constants/PlatformIds';
17
17
  export * from './constants/Positions';
18
18
  export * from './constants/QueueDescriptions';
19
19
  export * from './constants/QueueIds';
20
- export * from './constants/Queues';
20
+ export * from './constants/QueueTypes';
21
21
  export * from './constants/RankedRanks';
22
22
  export * from './constants/RankedTiers';
23
23
  export * from './constants/RegionalApiUris';
@@ -47,6 +47,9 @@ export * from './constants/Items/LegendaryItemNames';
47
47
  export * from './constants/Items/MythicItemKeys';
48
48
  export * from './constants/Items/MythicItemKeysNum';
49
49
  export * from './constants/Items/MythicItemNames';
50
+ export * from './constants/Items/OrnnItemKeys';
51
+ export * from './constants/Items/OrnnItemKeysNum';
52
+ export * from './constants/Items/OrnnItemNames';
50
53
  export * from './constants/Runes/NonStatRuneIds';
51
54
  export * from './constants/Runes/NonStatRuneIdsNum';
52
55
  export * from './constants/Runes/NonStatRuneNames';
@@ -86,6 +89,9 @@ export * from './helpers/Items/isLegendaryItemKey';
86
89
  export * from './helpers/Items/isLegendaryItemName';
87
90
  export * from './helpers/Items/isMythicItemKey';
88
91
  export * from './helpers/Items/isMythicItemName';
92
+ export * from './helpers/Items/isOrnnItemKey';
93
+ export * from './helpers/Items/isOrnnItemKeyNum';
94
+ export * from './helpers/Items/isOrnnItemName';
89
95
  export * from './helpers/Runes/getNonStatRuneIdByName';
90
96
  export * from './helpers/Runes/getNonStatRuneNameById';
91
97
  export * from './helpers/Runes/getRuneCategoryName';
package/core/index.js CHANGED
@@ -34,7 +34,7 @@ __exportStar(require("./constants/PlatformIds"), exports);
34
34
  __exportStar(require("./constants/Positions"), exports);
35
35
  __exportStar(require("./constants/QueueDescriptions"), exports);
36
36
  __exportStar(require("./constants/QueueIds"), exports);
37
- __exportStar(require("./constants/Queues"), exports);
37
+ __exportStar(require("./constants/QueueTypes"), exports);
38
38
  __exportStar(require("./constants/RankedRanks"), exports);
39
39
  __exportStar(require("./constants/RankedTiers"), exports);
40
40
  __exportStar(require("./constants/RegionalApiUris"), exports);
@@ -66,6 +66,9 @@ __exportStar(require("./constants/Items/LegendaryItemNames"), exports);
66
66
  __exportStar(require("./constants/Items/MythicItemKeys"), exports);
67
67
  __exportStar(require("./constants/Items/MythicItemKeysNum"), exports);
68
68
  __exportStar(require("./constants/Items/MythicItemNames"), exports);
69
+ __exportStar(require("./constants/Items/OrnnItemKeys"), exports);
70
+ __exportStar(require("./constants/Items/OrnnItemKeysNum"), exports);
71
+ __exportStar(require("./constants/Items/OrnnItemNames"), exports);
69
72
  // ## Runes
70
73
  __exportStar(require("./constants/Runes/NonStatRuneIds"), exports);
71
74
  __exportStar(require("./constants/Runes/NonStatRuneIdsNum"), exports);
@@ -110,6 +113,9 @@ __exportStar(require("./helpers/Items/isLegendaryItemKey"), exports);
110
113
  __exportStar(require("./helpers/Items/isLegendaryItemName"), exports);
111
114
  __exportStar(require("./helpers/Items/isMythicItemKey"), exports);
112
115
  __exportStar(require("./helpers/Items/isMythicItemName"), exports);
116
+ __exportStar(require("./helpers/Items/isOrnnItemKey"), exports);
117
+ __exportStar(require("./helpers/Items/isOrnnItemKeyNum"), exports);
118
+ __exportStar(require("./helpers/Items/isOrnnItemName"), exports);
113
119
  // ## Runes
114
120
  __exportStar(require("./helpers/Runes/getNonStatRuneIdByName"), exports);
115
121
  __exportStar(require("./helpers/Runes/getNonStatRuneNameById"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lol-constants",
3
- "version": "2.8.0",
3
+ "version": "2.9.1",
4
4
  "description": "League of Legends constants and data resources, such as champion, item, runes reforged, summoner spells.",
5
5
  "main": "core/index.js",
6
6
  "types": "core/index.d.ts",
@@ -15,9 +15,9 @@
15
15
  "dev": "vite"
16
16
  },
17
17
  "devDependencies": {
18
- "@types/node": "^20.1.4",
19
- "typescript": "^5.0.4",
20
- "vite": "^4.3.5"
18
+ "@types/node": "^20.6.0",
19
+ "typescript": "^5.2.2",
20
+ "vite": "^4.4.9"
21
21
  },
22
22
  "repository": {
23
23
  "type": "git",