maplestory-openapi
Version:
This JavaScript library enables the use of the MapleStory OpenAPI of Nexon.
68 lines (65 loc) • 2.06 kB
JavaScript
import { CharacterHexaMatrixDto as CharacterHexaMatrixDto$1, CharacterHexaMatrixEquipmentLinkedSkillDto as CharacterHexaMatrixEquipmentLinkedSkillDto$1, CharacterHexaMatrixEquipmentDto as CharacterHexaMatrixEquipmentDto$1 } from '../../../common/dto/character/characterHexaMatrix.js';
/**
* 角色已裝備於 HEXA 矩陣的 HEXA 核心資訊
*/
class CharacterHexaMatrixDto extends CharacterHexaMatrixDto$1 {
/**
* 要搜尋的日期 (TST,每日資料中的小時與分鐘將顯示為 0)
*/
date;
/**
* HEXA 核心資訊
*/
characterHexaCoreEquipment;
constructor(obj) {
super();
const { date, character_hexa_core_equipment } = obj;
this.date = date ? new Date(date) : null;
this.characterHexaCoreEquipment =
character_hexa_core_equipment?.map((equipment) => new CharacterHexaMatrixEquipmentDto(equipment)) ?? [];
}
}
/**
* 已連接的技能
*/
class CharacterHexaMatrixEquipmentLinkedSkillDto extends CharacterHexaMatrixEquipmentLinkedSkillDto$1 {
/**
* HEXA 技能名稱
*/
hexaSkillId;
constructor(obj) {
super();
const { hexa_skill_id } = obj;
this.hexaSkillId = hexa_skill_id;
}
}
/**
* HEXA 核心資訊
*/
class CharacterHexaMatrixEquipmentDto extends CharacterHexaMatrixEquipmentDto$1 {
/**
* 核心名稱
*/
hexaCoreName;
/**
* 核心等級
*/
hexaCoreLevel;
/**
* 核心類型
*/
hexaCoreType;
/**
* 已連接的技能
*/
linkedSkill;
constructor(obj) {
super();
const { hexa_core_name, hexa_core_level, hexa_core_type, linked_skill } = obj;
this.hexaCoreName = hexa_core_name;
this.hexaCoreLevel = hexa_core_level;
this.hexaCoreType = hexa_core_type;
this.linkedSkill = linked_skill.map((skill) => new CharacterHexaMatrixEquipmentLinkedSkillDto(skill));
}
}
export { CharacterHexaMatrixDto, CharacterHexaMatrixEquipmentDto, CharacterHexaMatrixEquipmentLinkedSkillDto };