UNPKG

enkanetwork

Version:

API wrapper for enka.network written on TypeScript which provides localization, caching and convenience

34 lines (33 loc) 1.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CharacterReliquary = void 0; const reliquaryTypes = { EQUIP_BRACER: "Flower", EQUIP_NECKLACE: "Feather", EQUIP_SHOES: "Sands", EQUIP_RING: "Goblet", EQUIP_DRESS: "Circlet", }; class CharacterReliquary { id; level; rarity; mainStats; subStats; icon; name; type; setName; constructor(assets, language, equipment) { this.id = equipment.itemId; this.name = assets.reliquaries.getName(+equipment.flat.nameTextMapHash, language); this.setName = assets.reliquarySets.getName(+equipment.flat.setNameTextMapHash, language); this.icon = assets.getAssetPath(equipment.flat.icon); this.type = reliquaryTypes[equipment.flat.equipType]; this.level = equipment.reliquary.level - 1; this.rarity = equipment.flat.rankLevel; this.mainStats = equipment.flat.reliquaryMainstat; this.subStats = equipment.flat.reliquarySubstats; } } exports.CharacterReliquary = CharacterReliquary;