UNPKG

enka-network-api

Version:

Enka-network API wrapper for Genshin Impact.

21 lines (20 loc) 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ArtifactSetBonus = void 0; const config_file_js_1 = require("config_file.js"); const TextAssets_1 = require("../assets/TextAssets"); const StatProperty_1 = require("../StatProperty"); const ExcelTransformer_1 = require("../../client/ExcelTransformer"); class ArtifactSetBonus { constructor(needCount, data, enka) { this.enka = enka; this._data = data; const json = new config_file_js_1.JsonReader(ExcelTransformer_1.excelJsonOptions, this._data); this.id = json.getAsNumber("affixId"); this.needCount = needCount; this.description = new TextAssets_1.TextAssets(json.getAsNumber("descTextMapHash"), enka); this.addProps = StatProperty_1.StatProperty.parseAddProps(json.get("addProps"), enka); this.paramList = json.has("paramList") ? json.get("paramList").mapArray((_, p) => p.getAsNumber()) : []; } } exports.ArtifactSetBonus = ArtifactSetBonus;