UNPKG

maplestory-openapi

Version:

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

78 lines (73 loc) 1.98 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var characterSkill = require('../../../common/dto/character/characterSkill.js'); /** * Character skill information */ class CharacterSkillDto extends characterSkill.CharacterSkillDto { /** * Reference date for query (SGT, daily data with hours and minutes set to 0) */ date; /** * Character job */ characterClass; /** * Job advancement tier required to acquire the skill */ characterSkillGrade; /** * Skill information */ characterSkill; constructor(obj) { super(); const { date, character_class, character_skill_grade, character_skill } = obj; this.date = date ? new Date(date) : null; this.characterClass = character_class; this.characterSkillGrade = character_skill_grade; this.characterSkill = character_skill.map((skill) => new CharacterSkillInfoDto(skill)); } } /** * Skill information */ class CharacterSkillInfoDto extends characterSkill.CharacterSkillInfoDto { /** * Skill name */ skillName; /** * Skill description */ skillDescription; /** * Skill level */ skillLevel; /** * Effect description by skill level */ skillEffect; /** * Effect description for the next skill level */ skillEffectNext; /** * Skill icon */ skillIcon; constructor(obj) { super(); const { skill_name, skill_description, skill_level, skill_effect, skill_effect_next, skill_icon, } = obj; this.skillName = skill_name; this.skillDescription = skill_description; this.skillLevel = skill_level; this.skillEffect = skill_effect; this.skillEffectNext = skill_effect_next; this.skillIcon = skill_icon; } } exports.CharacterSkillDto = CharacterSkillDto; exports.CharacterSkillInfoDto = CharacterSkillInfoDto;