lol-constants 2.22.0 → 2.24.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/assets/constants/BootsItemNames.js +1 -4
- package/assets/constants/Champion.d.ts +175 -175
- package/assets/constants/Champion.js +1 -4
- package/assets/constants/Item.d.ts +4758 -7569
- package/assets/constants/Item.js +1 -4
- package/assets/constants/LegendaryItemNames.d.ts +1 -1
- package/assets/constants/LegendaryItemNames.js +4 -7
- package/assets/constants/RunesReforged.d.ts +2 -2
- package/assets/constants/RunesReforged.js +1 -4
- package/assets/constants/StatRunes.js +1 -4
- package/assets/constants/StatRunesByRow.js +1 -4
- package/assets/constants/Summoner.d.ts +1 -1
- package/assets/constants/Summoner.js +1 -4
- package/assets/index.js +4 -21
- package/assets/scripts/asset-scripts/champion.d.ts +1 -0
- package/assets/scripts/asset-scripts/champion.js +9 -0
- package/assets/scripts/asset-scripts/generate-all.d.ts +4 -0
- package/assets/scripts/asset-scripts/generate-all.js +4 -0
- package/assets/scripts/asset-scripts/item.d.ts +1 -0
- package/assets/scripts/asset-scripts/item.js +9 -0
- package/assets/scripts/asset-scripts/runes-reforged.d.ts +1 -0
- package/assets/scripts/asset-scripts/runes-reforged.js +9 -0
- package/assets/scripts/asset-scripts/summoner.d.ts +1 -0
- package/assets/scripts/asset-scripts/summoner.js +9 -0
- package/assets/scripts/constants/RuneIdComment.js +1 -4
- package/assets/scripts/generate-categorized-item-keys-num.js +15 -37
- package/assets/scripts/generate-categorized-item-keys.js +12 -34
- package/assets/scripts/generate-categorized-item-names.js +12 -34
- package/assets/scripts/generate-champion-ids-by-name.js +5 -7
- package/assets/scripts/generate-champion-ids.js +5 -7
- package/assets/scripts/generate-champion-keys-num.js +7 -9
- package/assets/scripts/generate-champion-keys.js +5 -7
- package/assets/scripts/generate-champion-names.js +5 -7
- package/assets/scripts/generate-item-keys-num.js +7 -9
- package/assets/scripts/generate-item-keys.js +5 -7
- package/assets/scripts/generate-item-names.js +5 -7
- package/assets/scripts/generate-non-stat-rune-ids-num.js +4 -6
- package/assets/scripts/generate-non-stat-rune-ids.js +6 -8
- package/assets/scripts/generate-non-stat-rune-names.js +4 -6
- package/assets/scripts/generate-rune-ids.js +8 -10
- package/assets/scripts/generate-rune-names.js +6 -8
- package/assets/scripts/generate-rune-picking-relationships.js +4 -6
- package/assets/scripts/generate-rune-sets-by-rune-names-num.js +12 -14
- package/assets/scripts/generate-rune-sets-by-rune-names.js +10 -12
- package/assets/scripts/generate-rune-sets.js +7 -9
- package/assets/scripts/generate-spell-ids-by-name.js +5 -7
- package/assets/scripts/generate-spell-ids.js +5 -7
- package/assets/scripts/generate-spell-keys-num.js +7 -9
- package/assets/scripts/generate-spell-keys.js +5 -7
- package/assets/scripts/generate-spell-names.js +5 -7
- package/assets/scripts/generate-stat-rune-ids.js +6 -8
- package/assets/scripts/generate-stat-rune-names.js +4 -6
- package/assets/scripts/helpers/enableEscapedValues.js +1 -5
- package/assets/scripts/helpers/generateIndexFile.js +1 -5
- package/assets/scripts/helpers/getExportStatement.js +6 -10
- package/assets/scripts/helpers/getFmtdComment.js +1 -5
- package/assets/scripts/helpers/validateNumber.js +1 -5
- package/assets/scripts/helpers/writeToTmpFile.js +5 -9
- package/assets/scripts/print-file-names.js +5 -7
- package/core/constants/Abilities.js +6 -11
- package/core/constants/BuildingTypes.js +3 -7
- package/core/constants/Champions/ChampionClasses.d.ts +17 -0
- package/core/constants/Champions/ChampionClasses.js +25 -0
- package/core/constants/Champions/ChampionIds.js +1 -4
- package/core/constants/Champions/ChampionIdsByName.js +1 -4
- package/core/constants/Champions/ChampionKeys.js +1 -4
- package/core/constants/Champions/ChampionKeysNum.js +1 -4
- package/core/constants/Champions/ChampionNames.js +1 -4
- package/core/constants/Continents.js +3 -7
- package/core/constants/DataDragonUrls.d.ts +17 -16
- package/core/constants/DataDragonUrls.js +4 -7
- package/core/constants/DragonTypes.js +3 -7
- package/core/constants/GameModes.js +3 -7
- package/core/constants/GameTypes.js +3 -7
- package/core/constants/Items/BootsItemKeys.js +1 -4
- package/core/constants/Items/BootsItemKeysNum.js +1 -4
- package/core/constants/Items/BootsItemNames.js +1 -4
- package/core/constants/Items/ItemKeys.d.ts +0 -34
- package/core/constants/Items/ItemKeys.js +1 -4
- package/core/constants/Items/ItemKeysNum.d.ts +0 -34
- package/core/constants/Items/ItemKeysNum.js +1 -4
- package/core/constants/Items/ItemNames.d.ts +0 -34
- package/core/constants/Items/ItemNames.js +1 -4
- package/core/constants/Items/ItemTypes.js +3 -7
- package/core/constants/Items/LegendaryItemKeys.d.ts +0 -20
- package/core/constants/Items/LegendaryItemKeys.js +1 -4
- package/core/constants/Items/LegendaryItemKeysNum.d.ts +0 -20
- package/core/constants/Items/LegendaryItemKeysNum.js +1 -4
- package/core/constants/Items/LegendaryItemNames.d.ts +0 -20
- package/core/constants/Items/LegendaryItemNames.js +1 -4
- package/core/constants/KillTypes.js +3 -7
- package/core/constants/LaneTypes.js +3 -7
- package/core/constants/Lanes.js +3 -7
- package/core/constants/LeagueTexts.js +3 -7
- package/core/constants/Levels.js +3 -7
- package/core/constants/Locales.js +3 -7
- package/core/constants/MapIds.js +3 -7
- package/core/constants/MonsterTypes.d.ts +2 -1
- package/core/constants/MonsterTypes.js +5 -8
- package/core/constants/ParticipantIds.js +3 -7
- package/core/constants/PlatformApiUris.js +3 -7
- package/core/constants/PlatformIds.js +6 -11
- package/core/constants/Positions.js +3 -7
- package/core/constants/QueueIds.js +5 -9
- package/core/constants/QueueTypes.js +3 -7
- package/core/constants/RankedRanks.js +3 -7
- package/core/constants/RankedTiers.js +3 -7
- package/core/constants/RegionalApiUris.js +3 -7
- package/core/constants/Regions.js +6 -11
- package/core/constants/RelativeTeams.js +3 -7
- package/core/constants/Roles.js +3 -7
- package/core/constants/Runes/NonStatRuneIds.js +1 -4
- package/core/constants/Runes/NonStatRuneIdsNum.js +1 -4
- package/core/constants/Runes/NonStatRuneNames.js +1 -4
- package/core/constants/Runes/RuneIconFileNames.js +1 -4
- package/core/constants/Runes/RunePickingRelationships.js +1 -4
- package/core/constants/Runes/RuneSets.js +8 -11
- package/core/constants/Runes/RuneSetsByRuneNames.js +8 -11
- package/core/constants/Runes/RuneSetsByRuneNamesNum.js +8 -11
- package/core/constants/Runes/RuneTreeIds.js +6 -11
- package/core/constants/Runes/RuneTreeIdsNum.js +6 -11
- package/core/constants/Runes/RuneTreeNames.js +6 -11
- package/core/constants/Runes/RuneTreeTypes.js +3 -7
- package/core/constants/SkillSlots.js +3 -7
- package/core/constants/Skills.js +3 -7
- package/core/constants/Spells/SpellIds.js +1 -4
- package/core/constants/Spells/SpellIdsByName.js +1 -4
- package/core/constants/Spells/SpellKeys.js +1 -4
- package/core/constants/Spells/SpellKeysNum.js +1 -4
- package/core/constants/Spells/SpellNames.js +1 -4
- package/core/constants/TeamIds.js +3 -7
- package/core/constants/TowerTypes.js +3 -7
- package/core/constants/WardTypes.js +3 -7
- package/core/helpers/Champions/getChampionIdByKey.js +3 -7
- package/core/helpers/Champions/getChampionIdByName.js +3 -7
- package/core/helpers/Champions/getChampionKeyById.js +3 -7
- package/core/helpers/Champions/getChampionKeyByName.js +4 -8
- package/core/helpers/Champions/getChampionNameById.js +4 -8
- package/core/helpers/Champions/getChampionNameByKey.js +3 -7
- package/core/helpers/Champions/isChampionId.js +3 -7
- package/core/helpers/Champions/isChampionKey.js +3 -7
- package/core/helpers/Champions/isChampionKeyNum.js +3 -7
- package/core/helpers/Champions/isChampionName.js +3 -7
- package/core/helpers/Items/getItemKeyByName.js +3 -7
- package/core/helpers/Items/getItemNameByKey.js +3 -7
- package/core/helpers/Items/isBootsItemKey.js +3 -7
- package/core/helpers/Items/isBootsItemKeyNum.js +3 -7
- package/core/helpers/Items/isBootsItemName.js +3 -7
- package/core/helpers/Items/isItemKey.js +3 -7
- package/core/helpers/Items/isItemKeyNum.js +3 -7
- package/core/helpers/Items/isItemName.js +3 -7
- package/core/helpers/Items/isLegendaryItemKey.js +3 -7
- package/core/helpers/Items/isLegendaryItemKeyNum.js +3 -7
- package/core/helpers/Items/isLegendaryItemName.js +3 -7
- package/core/helpers/Items/isTier2Boots.d.ts +3 -0
- package/core/helpers/Items/isTier2Boots.js +9 -0
- package/core/helpers/Runes/getNonStatRuneIdByName.js +3 -7
- package/core/helpers/Runes/getNonStatRuneNameById.js +3 -7
- package/core/helpers/Runes/getRuneCategoryName.js +8 -12
- package/core/helpers/Runes/getRuneCdnUrl.js +16 -20
- package/core/helpers/Runes/getRuneIdByName.js +3 -7
- package/core/helpers/Runes/getRuneNameById.js +3 -7
- package/core/helpers/Runes/getStatRuneIdByName.js +3 -7
- package/core/helpers/Runes/getStatRuneNameById.js +3 -7
- package/core/helpers/Runes/isDominationRuneId.js +3 -7
- package/core/helpers/Runes/isDominationRuneIdNum.js +3 -7
- package/core/helpers/Runes/isDominationRuneName.js +3 -7
- package/core/helpers/Runes/isInspirationRuneId.js +3 -7
- package/core/helpers/Runes/isInspirationRuneIdNum.js +3 -7
- package/core/helpers/Runes/isInspirationRuneName.js +3 -7
- package/core/helpers/Runes/isKeystoneRuneId.js +3 -7
- package/core/helpers/Runes/isKeystoneRuneIdNum.js +3 -7
- package/core/helpers/Runes/isKeystoneRuneName.js +3 -7
- package/core/helpers/Runes/isNonStatRuneId.js +3 -7
- package/core/helpers/Runes/isNonStatRuneIdNum.js +3 -7
- package/core/helpers/Runes/isNonStatRuneName.js +3 -7
- package/core/helpers/Runes/isPrecisionRuneId.js +3 -7
- package/core/helpers/Runes/isPrecisionRuneIdNum.js +3 -7
- package/core/helpers/Runes/isPrecisionRuneName.js +3 -7
- package/core/helpers/Runes/isResolveRuneId.js +3 -7
- package/core/helpers/Runes/isResolveRuneIdNum.js +3 -7
- package/core/helpers/Runes/isResolveRuneName.js +3 -7
- package/core/helpers/Runes/isRuneId.js +3 -7
- package/core/helpers/Runes/isRuneIdNum.js +3 -7
- package/core/helpers/Runes/isRuneName.js +3 -7
- package/core/helpers/Runes/isSorceryRuneId.js +3 -7
- package/core/helpers/Runes/isSorceryRuneIdNum.js +3 -7
- package/core/helpers/Runes/isSorceryRuneName.js +3 -7
- package/core/helpers/Runes/isStatRuneId.js +3 -7
- package/core/helpers/Runes/isStatRuneIdNum.js +3 -7
- package/core/helpers/Runes/isStatRuneName.js +3 -7
- package/core/helpers/Spells/getSpellIdByKey.js +3 -7
- package/core/helpers/Spells/getSpellIdByName.js +3 -7
- package/core/helpers/Spells/getSpellKeyById.js +3 -7
- package/core/helpers/Spells/getSpellKeyByName.js +4 -8
- package/core/helpers/Spells/getSpellNameById.js +4 -8
- package/core/helpers/Spells/getSpellNameByKey.js +3 -7
- package/core/helpers/Spells/isSpellId.js +3 -7
- package/core/helpers/Spells/isSpellKey.js +3 -7
- package/core/helpers/Spells/isSpellKeyNum.js +3 -7
- package/core/helpers/Spells/isSpellName.js +3 -7
- package/core/helpers/getPositionImageUrl.js +3 -7
- package/core/helpers/isRiotId.js +7 -11
- package/core/helpers/makeRiotId.js +1 -5
- package/core/helpers/splitRiotId.js +1 -5
- package/core/index.d.ts +4 -6
- package/core/index.js +138 -156
- package/core/types/championJson.js +1 -2
- package/core/types/interfaces.js +1 -2
- package/core/types/types.js +1 -2
- package/package.json +11 -6
- package/assets/constants/OrnnItemNames.d.ts +0 -1
- package/assets/constants/OrnnItemNames.js +0 -33
- package/assets/scripts/generate-all.d.ts +0 -23
- package/assets/scripts/generate-all.js +0 -29
- package/core/constants/Items/OrnnItemKeys.d.ts +0 -23
- package/core/constants/Items/OrnnItemKeys.js +0 -4
- package/core/constants/Items/OrnnItemKeysNum.d.ts +0 -23
- package/core/constants/Items/OrnnItemKeysNum.js +0 -4
- package/core/constants/Items/OrnnItemNames.d.ts +0 -23
- package/core/constants/Items/OrnnItemNames.js +0 -4
- package/core/constants/QueueDescriptions.d.ts +0 -4
- package/core/constants/QueueDescriptions.js +0 -31
- package/core/helpers/Items/isOrnnItemKey.d.ts +0 -2
- package/core/helpers/Items/isOrnnItemKey.js +0 -8
- package/core/helpers/Items/isOrnnItemKeyNum.d.ts +0 -2
- package/core/helpers/Items/isOrnnItemKeyNum.js +0 -8
- package/core/helpers/Items/isOrnnItemName.d.ts +0 -2
- package/core/helpers/Items/isOrnnItemName.js +0 -8
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const ChampionIds_1 = require("../../constants/Champions/ChampionIds");
|
5
|
-
function getChampionIdByKey(key) {
|
6
|
-
return ChampionIds_1.ChampionIds[key];
|
1
|
+
import { ChampionIds } from '../../constants/Champions/ChampionIds';
|
2
|
+
export function getChampionIdByKey(key) {
|
3
|
+
return ChampionIds[key];
|
7
4
|
}
|
8
|
-
exports.getChampionIdByKey = getChampionIdByKey;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const ChampionIdsByName_1 = require("../../constants/Champions/ChampionIdsByName");
|
5
|
-
function getChampionIdByName(name) {
|
6
|
-
return ChampionIdsByName_1.ChampionIdsByName[name];
|
1
|
+
import { ChampionIdsByName } from '../../constants/Champions/ChampionIdsByName';
|
2
|
+
export function getChampionIdByName(name) {
|
3
|
+
return ChampionIdsByName[name];
|
7
4
|
}
|
8
|
-
exports.getChampionIdByName = getChampionIdByName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const ChampionKeys_1 = require("../../constants/Champions/ChampionKeys");
|
5
|
-
function getChampionKeyById(id) {
|
6
|
-
return ChampionKeys_1.ChampionKeys[id];
|
1
|
+
import { ChampionKeys } from '../../constants/Champions/ChampionKeys';
|
2
|
+
export function getChampionKeyById(id) {
|
3
|
+
return ChampionKeys[id];
|
7
4
|
}
|
8
|
-
exports.getChampionKeyById = getChampionKeyById;
|
@@ -1,9 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
const ChampionKeys_1 = require("../../constants/Champions/ChampionKeys");
|
6
|
-
function getChampionKeyByName(name) {
|
7
|
-
return ChampionKeys_1.ChampionKeys[ChampionIdsByName_1.ChampionIdsByName[name]];
|
1
|
+
import { ChampionIdsByName } from '../../constants/Champions/ChampionIdsByName';
|
2
|
+
import { ChampionKeys } from '../../constants/Champions/ChampionKeys';
|
3
|
+
export function getChampionKeyByName(name) {
|
4
|
+
return ChampionKeys[ChampionIdsByName[name]];
|
8
5
|
}
|
9
|
-
exports.getChampionKeyByName = getChampionKeyByName;
|
@@ -1,9 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
const ChampionNames_1 = require("../../constants/Champions/ChampionNames");
|
6
|
-
function getChampionNameById(id) {
|
7
|
-
return ChampionNames_1.ChampionNames[ChampionKeys_1.ChampionKeys[id]];
|
1
|
+
import { ChampionKeys } from '../../constants/Champions/ChampionKeys';
|
2
|
+
import { ChampionNames } from '../../constants/Champions/ChampionNames';
|
3
|
+
export function getChampionNameById(id) {
|
4
|
+
return ChampionNames[ChampionKeys[id]];
|
8
5
|
}
|
9
|
-
exports.getChampionNameById = getChampionNameById;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const ChampionNames_1 = require("../../constants/Champions/ChampionNames");
|
5
|
-
function getChampionNameByKey(key) {
|
6
|
-
return ChampionNames_1.ChampionNames[key];
|
1
|
+
import { ChampionNames } from '../../constants/Champions/ChampionNames';
|
2
|
+
export function getChampionNameByKey(key) {
|
3
|
+
return ChampionNames[key];
|
7
4
|
}
|
8
|
-
exports.getChampionNameByKey = getChampionNameByKey;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const ChampionKeys_1 = require("../../constants/Champions/ChampionKeys");
|
5
|
-
function isChampionId(id) {
|
6
|
-
return typeof id == 'string' && id in ChampionKeys_1.ChampionKeys;
|
1
|
+
import { ChampionKeys } from '../../constants/Champions/ChampionKeys';
|
2
|
+
export function isChampionId(id) {
|
3
|
+
return typeof id == 'string' && id in ChampionKeys;
|
7
4
|
}
|
8
|
-
exports.isChampionId = isChampionId;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const ChampionNames_1 = require("../../constants/Champions/ChampionNames");
|
5
|
-
function isChampionKey(key) {
|
6
|
-
return key in ChampionNames_1.ChampionNames;
|
1
|
+
import { ChampionNames } from '../../constants/Champions/ChampionNames';
|
2
|
+
export function isChampionKey(key) {
|
3
|
+
return key in ChampionNames;
|
7
4
|
}
|
8
|
-
exports.isChampionKey = isChampionKey;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const ChampionNames_1 = require("../../constants/Champions/ChampionNames");
|
5
|
-
function isChampionKeyNum(key) {
|
6
|
-
return key in ChampionNames_1.ChampionNames;
|
1
|
+
import { ChampionNames } from '../../constants/Champions/ChampionNames';
|
2
|
+
export function isChampionKeyNum(key) {
|
3
|
+
return key in ChampionNames;
|
7
4
|
}
|
8
|
-
exports.isChampionKeyNum = isChampionKeyNum;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const ChampionIdsByName_1 = require("../../constants/Champions/ChampionIdsByName");
|
5
|
-
function isChampionName(name) {
|
6
|
-
return typeof name == 'string' && name in ChampionIdsByName_1.ChampionIdsByName;
|
1
|
+
import { ChampionIdsByName } from '../../constants/Champions/ChampionIdsByName';
|
2
|
+
export function isChampionName(name) {
|
3
|
+
return typeof name == 'string' && name in ChampionIdsByName;
|
7
4
|
}
|
8
|
-
exports.isChampionName = isChampionName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const ItemKeys_1 = require("../../constants/Items/ItemKeys");
|
5
|
-
function getItemKeyByName(name) {
|
6
|
-
return ItemKeys_1.ItemKeys[name];
|
1
|
+
import { ItemKeys } from '../../constants/Items/ItemKeys';
|
2
|
+
export function getItemKeyByName(name) {
|
3
|
+
return ItemKeys[name];
|
7
4
|
}
|
8
|
-
exports.getItemKeyByName = getItemKeyByName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const ItemNames_1 = require("../../constants/Items/ItemNames");
|
5
|
-
function getItemNameByKey(key) {
|
6
|
-
return ItemNames_1.ItemNames[key];
|
1
|
+
import { ItemNames } from '../../constants/Items/ItemNames';
|
2
|
+
export function getItemNameByKey(key) {
|
3
|
+
return ItemNames[key];
|
7
4
|
}
|
8
|
-
exports.getItemNameByKey = getItemNameByKey;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const BootsItemNames_1 = require("../../constants/Items/BootsItemNames");
|
5
|
-
function isBootsItemKey(key) {
|
6
|
-
return key in BootsItemNames_1.BootsItemNames;
|
1
|
+
import { BootsItemNames } from '../../constants/Items/BootsItemNames';
|
2
|
+
export function isBootsItemKey(key) {
|
3
|
+
return key in BootsItemNames;
|
7
4
|
}
|
8
|
-
exports.isBootsItemKey = isBootsItemKey;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const BootsItemNames_1 = require("../../constants/Items/BootsItemNames");
|
5
|
-
function isBootsItemKeyNum(key) {
|
6
|
-
return key in BootsItemNames_1.BootsItemNames;
|
1
|
+
import { BootsItemNames } from '../../constants/Items/BootsItemNames';
|
2
|
+
export function isBootsItemKeyNum(key) {
|
3
|
+
return key in BootsItemNames;
|
7
4
|
}
|
8
|
-
exports.isBootsItemKeyNum = isBootsItemKeyNum;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const BootsItemKeys_1 = require("../../constants/Items/BootsItemKeys");
|
5
|
-
function isBootsItemName(name) {
|
6
|
-
return typeof name == 'string' && name in BootsItemKeys_1.BootsItemKeys;
|
1
|
+
import { BootsItemKeys } from '../../constants/Items/BootsItemKeys';
|
2
|
+
export function isBootsItemName(name) {
|
3
|
+
return typeof name == 'string' && name in BootsItemKeys;
|
7
4
|
}
|
8
|
-
exports.isBootsItemName = isBootsItemName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const ItemNames_1 = require("../../constants/Items/ItemNames");
|
5
|
-
function isItemKey(key) {
|
6
|
-
return key in ItemNames_1.ItemNames;
|
1
|
+
import { ItemNames } from '../../constants/Items/ItemNames';
|
2
|
+
export function isItemKey(key) {
|
3
|
+
return key in ItemNames;
|
7
4
|
}
|
8
|
-
exports.isItemKey = isItemKey;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const ItemNames_1 = require("../../constants/Items/ItemNames");
|
5
|
-
function isItemKeyNum(key) {
|
6
|
-
return key in ItemNames_1.ItemNames;
|
1
|
+
import { ItemNames } from '../../constants/Items/ItemNames';
|
2
|
+
export function isItemKeyNum(key) {
|
3
|
+
return key in ItemNames;
|
7
4
|
}
|
8
|
-
exports.isItemKeyNum = isItemKeyNum;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const ItemKeys_1 = require("../../constants/Items/ItemKeys");
|
5
|
-
function isItemName(name) {
|
6
|
-
return typeof name == 'string' && name in ItemKeys_1.ItemKeys;
|
1
|
+
import { ItemKeys } from '../../constants/Items/ItemKeys';
|
2
|
+
export function isItemName(name) {
|
3
|
+
return typeof name == 'string' && name in ItemKeys;
|
7
4
|
}
|
8
|
-
exports.isItemName = isItemName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const LegendaryItemNames_1 = require("../../constants/Items/LegendaryItemNames");
|
5
|
-
function isLegendaryItemKey(key) {
|
6
|
-
return key in LegendaryItemNames_1.LegendaryItemNames;
|
1
|
+
import { LegendaryItemNames } from '../../constants/Items/LegendaryItemNames';
|
2
|
+
export function isLegendaryItemKey(key) {
|
3
|
+
return key in LegendaryItemNames;
|
7
4
|
}
|
8
|
-
exports.isLegendaryItemKey = isLegendaryItemKey;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const LegendaryItemNames_1 = require("../../constants/Items/LegendaryItemNames");
|
5
|
-
function isLegendaryItemKeyNum(key) {
|
6
|
-
return key in LegendaryItemNames_1.LegendaryItemNames;
|
1
|
+
import { LegendaryItemNames } from '../../constants/Items/LegendaryItemNames';
|
2
|
+
export function isLegendaryItemKeyNum(key) {
|
3
|
+
return key in LegendaryItemNames;
|
7
4
|
}
|
8
|
-
exports.isLegendaryItemKeyNum = isLegendaryItemKeyNum;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const LegendaryItemKeys_1 = require("../../constants/Items/LegendaryItemKeys");
|
5
|
-
function isLegendaryItemName(name) {
|
6
|
-
return typeof name == 'string' && name in LegendaryItemKeys_1.LegendaryItemKeys;
|
1
|
+
import { LegendaryItemKeys } from '../../constants/Items/LegendaryItemKeys';
|
2
|
+
export function isLegendaryItemName(name) {
|
3
|
+
return typeof name == 'string' && name in LegendaryItemKeys;
|
7
4
|
}
|
8
|
-
exports.isLegendaryItemName = isLegendaryItemName;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
const tier1BootsItemKey = 1001;
|
2
|
+
const slightlyMagicalBootsItemKey = 2422;
|
3
|
+
const tier1Boots = {
|
4
|
+
[tier1BootsItemKey]: tier1BootsItemKey,
|
5
|
+
[slightlyMagicalBootsItemKey]: slightlyMagicalBootsItemKey,
|
6
|
+
};
|
7
|
+
export function isTier2Boots(itemKey) {
|
8
|
+
return !(itemKey in tier1Boots);
|
9
|
+
}
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const NonStatRuneIds_1 = require("../../constants/Runes/NonStatRuneIds");
|
5
|
-
function getNonStatRuneIdByName(name) {
|
6
|
-
return NonStatRuneIds_1.NonStatRuneIds[name];
|
1
|
+
import { NonStatRuneIds } from '../../constants/Runes/NonStatRuneIds';
|
2
|
+
export function getNonStatRuneIdByName(name) {
|
3
|
+
return NonStatRuneIds[name];
|
7
4
|
}
|
8
|
-
exports.getNonStatRuneIdByName = getNonStatRuneIdByName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const NonStatRuneNames_1 = require("../../constants/Runes/NonStatRuneNames");
|
5
|
-
function getNonStatRuneNameById(id) {
|
6
|
-
return NonStatRuneNames_1.NonStatRuneNames[id];
|
1
|
+
import { NonStatRuneNames } from '../../constants/Runes/NonStatRuneNames';
|
2
|
+
export function getNonStatRuneNameById(id) {
|
3
|
+
return NonStatRuneNames[id];
|
7
4
|
}
|
8
|
-
exports.getNonStatRuneNameById = getNonStatRuneNameById;
|
@@ -1,20 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSetsByRuneNames_1 = require("../../constants/Runes/RuneSetsByRuneNames");
|
5
|
-
function getRuneCategoryName(name) {
|
6
|
-
if (name in RuneSetsByRuneNames_1.StatRuneIds)
|
1
|
+
import { PrimaryRuneTreesByRuneNames, StatRuneIds } from '../../constants/Runes/RuneSetsByRuneNames';
|
2
|
+
export function getRuneCategoryName(name) {
|
3
|
+
if (name in StatRuneIds)
|
7
4
|
return 'StatRunes';
|
8
|
-
if (name in
|
5
|
+
if (name in PrimaryRuneTreesByRuneNames.Precision)
|
9
6
|
return 'Precision';
|
10
|
-
if (name in
|
7
|
+
if (name in PrimaryRuneTreesByRuneNames.Domination)
|
11
8
|
return 'Domination';
|
12
|
-
if (name in
|
9
|
+
if (name in PrimaryRuneTreesByRuneNames.Sorcery)
|
13
10
|
return 'Sorcery';
|
14
|
-
if (name in
|
11
|
+
if (name in PrimaryRuneTreesByRuneNames.Resolve)
|
15
12
|
return 'Resolve';
|
16
|
-
if (name in
|
13
|
+
if (name in PrimaryRuneTreesByRuneNames.Inspiration)
|
17
14
|
return 'Inspiration';
|
18
15
|
throw 'impossible code reached';
|
19
16
|
}
|
20
|
-
exports.getRuneCategoryName = getRuneCategoryName;
|
@@ -1,26 +1,23 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
const getRuneCategoryName_1 = require("./getRuneCategoryName");
|
8
|
-
const isStatRuneName_1 = require("./isStatRuneName");
|
9
|
-
function getRuneCdnUrl(name) {
|
1
|
+
import { DataDragonUrls } from '../../constants/DataDragonUrls';
|
2
|
+
import { RuneIconFileNames } from '../../constants/Runes/RuneIconFileNames';
|
3
|
+
import { isRuneTreeName } from '../../constants/Runes/RuneTreeNames';
|
4
|
+
import { getRuneCategoryName } from './getRuneCategoryName';
|
5
|
+
import { isStatRuneName } from './isStatRuneName';
|
6
|
+
export function getRuneCdnUrl(name) {
|
10
7
|
if (name == 'runesicon')
|
11
|
-
return `${
|
8
|
+
return `${DataDragonUrls.TREE_RUNE_ICON_BASE}/${RuneIconFileNames[name]}.png`;
|
12
9
|
// Choose the appropriate base path
|
13
|
-
const base =
|
14
|
-
?
|
15
|
-
:
|
10
|
+
const base = isStatRuneName(name)
|
11
|
+
? DataDragonUrls.STAT_RUNE_ICON_BASE
|
12
|
+
: DataDragonUrls.TREE_RUNE_ICON_BASE;
|
16
13
|
// Already sufficient enough response for a rune tree name
|
17
|
-
if (
|
18
|
-
return `${base}/${
|
14
|
+
if (isRuneTreeName(name))
|
15
|
+
return `${base}/${RuneIconFileNames[name]}.png`;
|
19
16
|
// And stat runes
|
20
|
-
if (
|
21
|
-
return `${base}/${
|
17
|
+
if (isStatRuneName(name))
|
18
|
+
return `${base}/${RuneIconFileNames[name]}.png`;
|
22
19
|
// Finish for tree rune names
|
23
|
-
let category =
|
20
|
+
let category = getRuneCategoryName(name);
|
24
21
|
// Remove spaces, colons, apostrophes and make lowercase
|
25
22
|
let runeTreeFolder = category.replaceAll(' ', '').toLowerCase();
|
26
23
|
let runeFolder = name.replaceAll(/[:' ]/g, '').toLowerCase();
|
@@ -49,6 +46,5 @@ function getRuneCdnUrl(name) {
|
|
49
46
|
runeFolder = 'perfecttiming';
|
50
47
|
break;
|
51
48
|
}
|
52
|
-
return `${base}/${runeTreeFolder}/${runeFolder}/${
|
49
|
+
return `${base}/${runeTreeFolder}/${runeFolder}/${RuneIconFileNames[name]}.png`;
|
53
50
|
}
|
54
|
-
exports.getRuneCdnUrl = getRuneCdnUrl;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSetsByRuneNames_1 = require("../../constants/Runes/RuneSetsByRuneNames");
|
5
|
-
function getRuneIdByName(name) {
|
6
|
-
return RuneSetsByRuneNames_1.RuneIds[name];
|
1
|
+
import { RuneIds } from '../../constants/Runes/RuneSetsByRuneNames';
|
2
|
+
export function getRuneIdByName(name) {
|
3
|
+
return RuneIds[name];
|
7
4
|
}
|
8
|
-
exports.getRuneIdByName = getRuneIdByName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function getRuneNameById(id) {
|
6
|
-
return RuneSets_1.RuneNames[id];
|
1
|
+
import { RuneNames } from '../../constants/Runes/RuneSets';
|
2
|
+
export function getRuneNameById(id) {
|
3
|
+
return RuneNames[id];
|
7
4
|
}
|
8
|
-
exports.getRuneNameById = getRuneNameById;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSetsByRuneNames_1 = require("../../constants/Runes/RuneSetsByRuneNames");
|
5
|
-
function getStatRuneIdByName(name) {
|
6
|
-
return RuneSetsByRuneNames_1.StatRuneIds[name];
|
1
|
+
import { StatRuneIds } from '../../constants/Runes/RuneSetsByRuneNames';
|
2
|
+
export function getStatRuneIdByName(name) {
|
3
|
+
return StatRuneIds[name];
|
7
4
|
}
|
8
|
-
exports.getStatRuneIdByName = getStatRuneIdByName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function getStatRuneNameById(id) {
|
6
|
-
return RuneSets_1.StatRuneNames[id];
|
1
|
+
import { StatRuneNames } from '../../constants/Runes/RuneSets';
|
2
|
+
export function getStatRuneNameById(id) {
|
3
|
+
return StatRuneNames[id];
|
7
4
|
}
|
8
|
-
exports.getStatRuneNameById = getStatRuneNameById;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isDominationRuneId(id) {
|
6
|
-
return id in RuneSets_1.PrimaryRuneTrees.Domination;
|
1
|
+
import { PrimaryRuneTrees } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isDominationRuneId(id) {
|
3
|
+
return id in PrimaryRuneTrees.Domination;
|
7
4
|
}
|
8
|
-
exports.isDominationRuneId = isDominationRuneId;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isDominationRuneIdNum(id) {
|
6
|
-
return id in RuneSets_1.PrimaryRuneTrees.Domination;
|
1
|
+
import { PrimaryRuneTrees } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isDominationRuneIdNum(id) {
|
3
|
+
return id in PrimaryRuneTrees.Domination;
|
7
4
|
}
|
8
|
-
exports.isDominationRuneIdNum = isDominationRuneIdNum;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSetsByRuneNames_1 = require("../../constants/Runes/RuneSetsByRuneNames");
|
5
|
-
function isDominationRuneName(value) {
|
6
|
-
return typeof value == 'string' && value in RuneSetsByRuneNames_1.RuneSetsByRuneNames.PrimaryRuneTreesByRuneNames.Domination;
|
1
|
+
import { RuneSetsByRuneNames } from '../../constants/Runes/RuneSetsByRuneNames';
|
2
|
+
export function isDominationRuneName(value) {
|
3
|
+
return typeof value == 'string' && value in RuneSetsByRuneNames.PrimaryRuneTreesByRuneNames.Domination;
|
7
4
|
}
|
8
|
-
exports.isDominationRuneName = isDominationRuneName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isInspirationRuneId(id) {
|
6
|
-
return id in RuneSets_1.PrimaryRuneTrees.Inspiration;
|
1
|
+
import { PrimaryRuneTrees } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isInspirationRuneId(id) {
|
3
|
+
return id in PrimaryRuneTrees.Inspiration;
|
7
4
|
}
|
8
|
-
exports.isInspirationRuneId = isInspirationRuneId;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isInspirationRuneIdNum(id) {
|
6
|
-
return id in RuneSets_1.PrimaryRuneTrees.Inspiration;
|
1
|
+
import { PrimaryRuneTrees } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isInspirationRuneIdNum(id) {
|
3
|
+
return id in PrimaryRuneTrees.Inspiration;
|
7
4
|
}
|
8
|
-
exports.isInspirationRuneIdNum = isInspirationRuneIdNum;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSetsByRuneNames_1 = require("../../constants/Runes/RuneSetsByRuneNames");
|
5
|
-
function isInspirationRuneName(value) {
|
6
|
-
return typeof value == 'string' && value in RuneSetsByRuneNames_1.RuneSetsByRuneNames.PrimaryRuneTreesByRuneNames.Inspiration;
|
1
|
+
import { RuneSetsByRuneNames } from '../../constants/Runes/RuneSetsByRuneNames';
|
2
|
+
export function isInspirationRuneName(value) {
|
3
|
+
return typeof value == 'string' && value in RuneSetsByRuneNames.PrimaryRuneTreesByRuneNames.Inspiration;
|
7
4
|
}
|
8
|
-
exports.isInspirationRuneName = isInspirationRuneName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isKeystoneRuneId(id) {
|
6
|
-
return id in RuneSets_1.KeystoneNames;
|
1
|
+
import { KeystoneNames } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isKeystoneRuneId(id) {
|
3
|
+
return id in KeystoneNames;
|
7
4
|
}
|
8
|
-
exports.isKeystoneRuneId = isKeystoneRuneId;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSets_1 = require("../../constants/Runes/RuneSets");
|
5
|
-
function isKeystoneRuneIdNum(id) {
|
6
|
-
return id in RuneSets_1.KeystoneNames;
|
1
|
+
import { KeystoneNames } from '../../constants/Runes/RuneSets';
|
2
|
+
export function isKeystoneRuneIdNum(id) {
|
3
|
+
return id in KeystoneNames;
|
7
4
|
}
|
8
|
-
exports.isKeystoneRuneIdNum = isKeystoneRuneIdNum;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const RuneSetsByRuneNames_1 = require("../../constants/Runes/RuneSetsByRuneNames");
|
5
|
-
function isKeystoneRuneName(value) {
|
6
|
-
return typeof value == 'string' && value in RuneSetsByRuneNames_1.KeystoneIds;
|
1
|
+
import { KeystoneIds } from '../../constants/Runes/RuneSetsByRuneNames';
|
2
|
+
export function isKeystoneRuneName(value) {
|
3
|
+
return typeof value == 'string' && value in KeystoneIds;
|
7
4
|
}
|
8
|
-
exports.isKeystoneRuneName = isKeystoneRuneName;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const NonStatRuneNames_1 = require("../../constants/Runes/NonStatRuneNames");
|
5
|
-
function isNonStatRuneId(id) {
|
6
|
-
return id in NonStatRuneNames_1.NonStatRuneNames;
|
1
|
+
import { NonStatRuneNames } from '../../constants/Runes/NonStatRuneNames';
|
2
|
+
export function isNonStatRuneId(id) {
|
3
|
+
return id in NonStatRuneNames;
|
7
4
|
}
|
8
|
-
exports.isNonStatRuneId = isNonStatRuneId;
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const NonStatRuneNames_1 = require("../../constants/Runes/NonStatRuneNames");
|
5
|
-
function isNonStatRuneIdNum(id) {
|
6
|
-
return id in NonStatRuneNames_1.NonStatRuneNames;
|
1
|
+
import { NonStatRuneNames } from '../../constants/Runes/NonStatRuneNames';
|
2
|
+
export function isNonStatRuneIdNum(id) {
|
3
|
+
return id in NonStatRuneNames;
|
7
4
|
}
|
8
|
-
exports.isNonStatRuneIdNum = isNonStatRuneIdNum;
|