UNPKG

maplestory-openapi

Version:

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

98 lines (93 loc) 2.69 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var characterSetEffect = require('../../../common/dto/character/characterSetEffect.js'); /** * Character information about equipped set item effects */ class CharacterSetEffectDto extends characterSetEffect.CharacterSetEffectDto { /** * Reference date for query (SGT, daily data with hours and minutes set to 0) */ date; /** * Set Item effect information */ setEffect; constructor(obj) { super(); const { date, set_effect } = obj; this.date = date ? new Date(date) : null; this.setEffect = set_effect.map((effect) => new CharacterSetEffectSetDto(effect)); } } /** * Active Set Item effect information */ class CharacterSetEffectInfoDto extends characterSetEffect.CharacterSetEffectInfoDto { /** * Set Item effect level (number of equipped items) */ setCount; /** * Set Item effect */ setOption; constructor(obj) { super(); const { set_count, set_option } = obj; this.setCount = set_count; this.setOption = set_option; } } /** * All Set Item effect information */ class CharacterSetEffectOptionFullDto extends characterSetEffect.CharacterSetEffectOptionFullDto { /** * Set Item effect level (number of equipped items) */ setCount; /** * Set Item effect */ setOption; constructor(obj) { super(); const { set_count, set_option } = obj; this.setCount = set_count; this.setOption = set_option; } } /** * Set Item effect information */ class CharacterSetEffectSetDto extends characterSetEffect.CharacterSetEffectSetDto { /** * Set Item effect name */ setName; /** * Number of Set Items (including Lucky Items) */ totalSetCount; /** * Active Set Item effect information */ setEffectInfo; /** * All Set Item effect information */ setOptionFull; constructor(obj) { super(); const { set_name, total_set_count, set_effect_info, set_option_full } = obj; this.setName = set_name; this.totalSetCount = total_set_count; this.setEffectInfo = set_effect_info.map((info) => new CharacterSetEffectInfoDto(info)); this.setOptionFull = set_option_full.map((info) => new CharacterSetEffectOptionFullDto(info)); } } exports.CharacterSetEffectDto = CharacterSetEffectDto; exports.CharacterSetEffectInfoDto = CharacterSetEffectInfoDto; exports.CharacterSetEffectOptionFullDto = CharacterSetEffectOptionFullDto; exports.CharacterSetEffectSetDto = CharacterSetEffectSetDto;