UNPKG

maplestory-openapi

Version:

This JavaScript library enables the use of the MapleStory OpenAPI of Nexon.

98 lines (93 loc) 2.93 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var characterHyperStat = require('../../../common/dto/character/characterHyperStat.js'); /** * 角色極限屬性資訊 */ class CharacterHyperStatDto extends characterHyperStat.CharacterHyperStatDto { /** * 要搜尋的日期 (TST,每日資料中的小時與分鐘將顯示為 0) */ date; /** * 角色職業 */ characterClass; /** * 目前套用的預設編號 */ usePresetNo; /** * 可用的極限屬性點數上限 */ useAvailableHyperStat; /** * 預設 1 的極限屬性資訊 */ hyperStatPreset1; /** * 預設 1 剩餘的極限屬性點數 */ hyperStatPreset1RemainPoint; /** * 預設 2 的極限屬性資訊 */ hyperStatPreset2; /** * 預設 2 剩餘的極限屬性點數 */ hyperStatPreset2RemainPoint; /** * 預設 3 的極限屬性資訊 */ hyperStatPreset3; /** * 預設 3 剩餘的極限屬性點數 */ hyperStatPreset3RemainPoint; constructor(obj) { super(); const { date, character_class, use_preset_no, use_available_hyper_stat, hyper_stat_preset_1, hyper_stat_preset_1_remain_point, hyper_stat_preset_2, hyper_stat_preset_2_remain_point, hyper_stat_preset_3, hyper_stat_preset_3_remain_point, } = obj; this.date = date ? new Date(date) : null; this.characterClass = character_class; this.usePresetNo = use_preset_no; this.useAvailableHyperStat = use_available_hyper_stat; this.hyperStatPreset1 = hyper_stat_preset_1.map((preset) => new CharacterHyperStatPresetDto(preset)); this.hyperStatPreset1RemainPoint = hyper_stat_preset_1_remain_point; this.hyperStatPreset2 = hyper_stat_preset_2.map((preset) => new CharacterHyperStatPresetDto(preset)); this.hyperStatPreset2RemainPoint = hyper_stat_preset_2_remain_point; this.hyperStatPreset3 = hyper_stat_preset_3.map((preset) => new CharacterHyperStatPresetDto(preset)); this.hyperStatPreset3RemainPoint = hyper_stat_preset_3_remain_point; } } /** * 預設的極限屬性資訊 */ class CharacterHyperStatPresetDto extends characterHyperStat.CharacterHyperStatPresetDto { /** * 能力值類型 */ statType; /** * 投入於能力值的點數 */ statPoint; /** * 能力值等級 */ statLevel; /** * 能力值提升量 */ statIncrease; constructor(obj) { super(); const { stat_type, stat_point, stat_level, stat_increase } = obj; this.statType = stat_type; this.statPoint = stat_point; this.statLevel = stat_level; this.statIncrease = stat_increase; } } exports.CharacterHyperStatDto = CharacterHyperStatDto; exports.CharacterHyperStatPresetDto = CharacterHyperStatPresetDto;