UNPKG

maplestory-openapi

Version:

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

206 lines (203 loc) 6.22 kB
import { UnionRaiderDto as UnionRaiderDto$1, UnionRaiderInnerStatDto as UnionRaiderInnerStatDto$1, UnionRaiderBlockPositionDto as UnionRaiderBlockPositionDto$1, UnionRaiderBlockControlPointDto as UnionRaiderBlockControlPointDto$1, UnionRaiderBlockDto as UnionRaiderBlockDto$1, UnionRaiderPresetDto as UnionRaiderPresetDto$1 } from '../../../common/dto/union/unionRaider.js'; /** * Union raider information */ class UnionRaiderDto extends UnionRaiderDto$1 { /** * Reference date for query (SGT, daily data with hours and minutes set to 0) */ date; /** * Union raid member effects */ unionRaiderStat; /** * Union raid capture effects */ unionOccupiedStat; /** * Union raider deployment */ unionInnerStat; /** * Union Legion Block */ unionBlock; /** * Number of the preset currently in use */ usePresetNo; /** * Information for Union Preset 1 */ unionRaiderPreset1; /** * Information for Union Preset 2 */ unionRaiderPreset2; /** * Information for Union Preset 3 */ unionRaiderPreset3; /** * Information for Union Preset 4 */ unionRaiderPreset4; /** * Information for Union Preset 5 */ unionRaiderPreset5; constructor(obj) { super(); const { date, union_raider_stat, union_occupied_stat, union_inner_stat, union_block, use_preset_no, union_raider_preset_1, union_raider_preset_2, union_raider_preset_3, union_raider_preset_4, union_raider_preset_5, } = obj; this.date = date ? new Date(date) : null; this.unionRaiderStat = union_raider_stat; this.unionOccupiedStat = union_occupied_stat; this.unionInnerStat = union_inner_stat.map((stat) => new UnionRaiderInnerStatDto(stat)); this.unionBlock = union_block.map((block) => new UnionRaiderBlockDto(block)); this.usePresetNo = use_preset_no; this.unionRaiderPreset1 = union_raider_preset_1 ? new UnionRaiderPresetDto(union_raider_preset_1) : null; this.unionRaiderPreset2 = union_raider_preset_2 ? new UnionRaiderPresetDto(union_raider_preset_2) : null; this.unionRaiderPreset3 = union_raider_preset_3 ? new UnionRaiderPresetDto(union_raider_preset_3) : null; this.unionRaiderPreset4 = union_raider_preset_4 ? new UnionRaiderPresetDto(union_raider_preset_4) : null; this.unionRaiderPreset5 = union_raider_preset_5 ? new UnionRaiderPresetDto(union_raider_preset_5) : null; } } /** * Union raider deployment information */ class UnionRaiderInnerStatDto extends UnionRaiderInnerStatDto$1 { /** * Raider deployment position (0 to 7, clockwise from 11 o'clock) */ statFieldId; /** * Occupation effects over the area */ statFieldEffect; constructor(obj) { super(); const { stat_field_id, stat_field_effect } = obj; this.statFieldId = stat_field_id; this.statFieldEffect = stat_field_effect; } } /** * Coordinates of the area occupied by the block */ class UnionRaiderBlockPositionDto extends UnionRaiderBlockPositionDto$1 { /** * Block X-coordinate */ x; /** * Block Y-coordinate */ y; constructor(obj) { super(); const { x, y } = obj; this.x = x; this.y = y; } } /** * Coordinates of the block's reference point: * - The bottom-right square among the four central squares is positioned at x: 0, y: 0. * - Moving one square to the left decreases x by 1. * - Moving one square to the right increases x by 1. * - Moving one square downward decreases y by 1. * - Moving one square upward increases y by 1. */ class UnionRaiderBlockControlPointDto extends UnionRaiderBlockControlPointDto$1 { /** * Block reference point X-coordinate */ x; /** * Block reference point Y-coordinate */ y; constructor(obj) { super(); const { x, y } = obj; this.x = x; this.y = y; } } /** * Union Legion Block information */ class UnionRaiderBlockDto extends UnionRaiderBlockDto$1 { /** * Block shapes (Warrior, Magician, Bowman, Thief, Pirate, Maple M, Hybrid) */ blockType; /** * Character class corresponding to the block */ blockClass; /** * Character level corresponding to the block */ blockLevel; /** * Coordinates of the block's reference point */ blockControlPoint; /** * Coordinates of the area occupied by the block (null if not placed) */ blockPosition; constructor(obj) { super(); const { block_type, block_class, block_level, block_control_point, block_position, } = obj; this.blockType = block_type; this.blockClass = block_class; this.blockLevel = block_level; this.blockControlPoint = new UnionRaiderBlockControlPointDto(block_control_point); this.blockPosition = block_position ? block_position.map((position) => new UnionRaiderBlockPositionDto(position)) : null; } } /** * Union preset information */ class UnionRaiderPresetDto extends UnionRaiderPresetDto$1 { /** * Union raid member effects */ unionRaiderStat; /** * Union raid capture effects */ unionOccupiedStat; /** * Union raider deployment */ unionInnerStat; /** * Information about Legion Blocks */ unionBlock; constructor(obj) { super(); const { union_raider_stat, union_occupied_stat, union_inner_stat, union_block, } = obj; this.unionRaiderStat = union_raider_stat; this.unionOccupiedStat = union_occupied_stat; this.unionInnerStat = union_inner_stat.map((stat) => new UnionRaiderInnerStatDto(stat)); this.unionBlock = union_block.map((block) => new UnionRaiderBlockDto(block)); } } export { UnionRaiderBlockControlPointDto, UnionRaiderBlockDto, UnionRaiderBlockPositionDto, UnionRaiderDto, UnionRaiderInnerStatDto, UnionRaiderPresetDto };