UNPKG

maplestory-openapi

Version:

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

53 lines (50 loc) 1.27 kB
import { CharacterStatDto as CharacterStatDto$1, CharacterFinalStatDto as CharacterFinalStatDto$1 } from '../../../common/dto/character/characterStat.js'; /** * 角色綜合能力值資訊 */ class CharacterStatDto extends CharacterStatDto$1 { /** * 要搜尋的日期 (TST,每日資料中的小時與分鐘將顯示為 0) */ date; /** * 角色職業 */ characterClass; /** * 當前能力值資訊 */ finalStat; /** * 剩餘 AP */ remainAP; constructor(obj) { super(); const { date, character_class, final_stat, remain_ap } = obj; this.date = date ? new Date(date) : null; this.characterClass = character_class; this.finalStat = final_stat.map((stat) => new CharacterFinalStatDto(stat)); this.remainAP = remain_ap; } } /** * 當前能力值資訊 */ class CharacterFinalStatDto extends CharacterFinalStatDto$1 { /** * 能力值名稱 */ statName; /** * 能力值數值 */ statValue; constructor(obj) { super(); const { stat_name, stat_value } = obj; this.statName = stat_name; this.statValue = stat_value; } } export { CharacterFinalStatDto, CharacterStatDto };