UNPKG

maplestory-openapi

Version:

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

457 lines (452 loc) 13.7 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var characterAndroidEquipment = require('../../../common/dto/character/characterAndroidEquipment.js'); /** * 캐릭터 안드로이드 장비 정보 */ class CharacterAndroidEquipmentDto extends characterAndroidEquipment.CharacterAndroidEquipmentDto { /** * 조회 기준일 (KST, 일 단위 데이터로 시, 분은 일괄 0으로 표기) */ date; /** * 안드로이드 명 */ androidName; /** * 안드로이드 닉네임 */ androidNickname; /** * 안드로이드 아이콘 */ androidIcon; /** * 안드로이드 아이템 설명 */ androidDescription; /** * 안드로이드 헤어 정보 */ androidHair; /** * 안드로이드 성형 정보 */ androidFace; /** * 안드로이드 피부 정보 */ androidSkin; /** * 안드로이드 캐시 아이템 장착 정보 */ androidCashItemEquipment; /** * 안드로이드 이어센서 클립 적용 여부 */ androidEarSensorClipFlag; /** * 안드로이드 성별 */ androidGender; /** * 안드로이드 등급 */ androidGrade; /** * 비인간형 안드로이드 여부 */ androidNonHumanoidFlag; /** * 잡화상점 기능 이용 가능 여부 */ androidShopUsableFlag; /** * 적용 중인 장비 프리셋 번호 */ presetNo; /** * 1번 프리셋 안드로이드 정보 */ androidPreset1; /** * 2번 프리셋 안드로이드 정보 */ androidPreset2; /** * 3번 프리셋 안드로이드 정보 */ androidPreset3; constructor(obj) { super(); const { date, android_name, android_nickname, android_icon, android_description, android_hair, android_face, android_skin, android_cash_item_equipment, android_ear_sensor_clip_flag, android_gender, android_grade, android_non_humanoid_flag, android_shop_usable_flag, preset_no, android_preset_1, android_preset_2, android_preset_3, } = obj; this.date = date ? new Date(date) : null; this.androidName = android_name; this.androidNickname = android_nickname; this.androidIcon = android_icon; this.androidDescription = android_description; this.androidHair = android_hair ? new CharacterAndroidEquipmentHairDto(android_hair) : null; this.androidFace = android_face ? new CharacterAndroidEquipmentFaceDto(android_face) : null; this.androidSkin = android_skin ? new CharacterAndroidEquipmentSkinDto(android_skin) : null; this.androidCashItemEquipment = android_cash_item_equipment.map((equipment) => new CharacterAndroidCashItemEquipmentDto(equipment)); this.androidEarSensorClipFlag = android_ear_sensor_clip_flag; this.androidGender = android_gender; this.androidGrade = android_grade; this.androidNonHumanoidFlag = android_non_humanoid_flag; this.androidShopUsableFlag = android_shop_usable_flag; this.presetNo = preset_no; this.androidPreset1 = android_preset_1 ? new CharacterAndroidEquipmentPresetDto(android_preset_1) : null; this.androidPreset2 = android_preset_2 ? new CharacterAndroidEquipmentPresetDto(android_preset_2) : null; this.androidPreset3 = android_preset_3 ? new CharacterAndroidEquipmentPresetDto(android_preset_3) : null; } } /** * 캐릭터 안드로이드 성형 정보 */ class CharacterAndroidEquipmentFaceDto extends characterAndroidEquipment.CharacterAndroidEquipmentFaceDto { /** * 안드로이드 성형 명 */ faceName; /** * 안드로이드 성형 베이스 컬러 */ baseColor; /** * 안드로이드 성형 믹스 컬러 */ mixColor; /** * 안드로이드 성형 믹스 컬러의 염색 비율 */ mixRate; /** * 프리스타일 쿠폰 적용 여부 (0:미적용, 1:적용) */ freestyleFlag; constructor(obj) { super(); const { face_name, base_color, mix_color, mix_rate, freestyle_flag } = obj; this.faceName = face_name; this.baseColor = base_color; this.mixColor = mix_color; this.mixRate = mix_rate; this.freestyleFlag = freestyle_flag; } /** * 프리스타일 쿠폰 적용 여부 */ get isFreestyleFlag() { return this.freestyleFlag === '1'; } } /** * 캐릭터 안드로이드 헤어 정보 */ class CharacterAndroidEquipmentHairDto extends characterAndroidEquipment.CharacterAndroidEquipmentHairDto { /** * 안드로이드 헤어 명 */ hairName; /** * 안드로이드 헤어 베이스 컬러 */ baseColor; /** * 안드로이드 헤어 믹스 컬러 */ mixColor; /** * 안드로이드 헤어 믹스 컬러의 염색 비율 */ mixRate; /** * 프리스타일 쿠폰 적용 여부 (0:미적용, 1:적용) */ freestyleFlag; constructor(obj) { super(); const { hair_name, base_color, mix_color, mix_rate, freestyle_flag } = obj; this.hairName = hair_name; this.baseColor = base_color; this.mixColor = mix_color; this.mixRate = mix_rate; this.freestyleFlag = freestyle_flag; } /** * 프리스타일 쿠폰 적용 여부 */ get isFreestyleFlag() { return this.freestyleFlag === '1'; } } /** * 캐릭터 안드로이드 피부 정보 */ class CharacterAndroidEquipmentSkinDto extends characterAndroidEquipment.CharacterAndroidEquipmentSkinDto { /** * 피부 명 */ skinName; /** * 색상 계열 */ colorStyle; /** * 피부 색조 */ hue; /** * 피부 채도 */ saturation; /** * 피부 명도 */ brightness; constructor(obj) { super(); const { skin_name, color_style, hue, saturation, brightness } = obj; this.skinName = skin_name; this.colorStyle = color_style; this.hue = hue; this.saturation = saturation; this.brightness = brightness; } } /** * 캐릭터 안드로이드 프리셋 정보 */ class CharacterAndroidEquipmentPresetDto extends characterAndroidEquipment.CharacterAndroidEquipmentPresetDto { /** * 안드로이드 명 */ androidName; /** * 안드로이드 닉네임 */ androidNickname; /** * 안드로이드 아이콘 */ androidIcon; /** * 안드로이드 아이템 설명 */ androidDescription; /** * 안드로이드 성별 */ androidGender; /** * 안드로이드 등급 */ androidGrade; /** * 안드로이드 헤어 정보 */ androidHair; /** * 안드로이드 성형 정보 */ androidFace; /** * 안드로이드 피부 정보 */ androidSkin; /** * 안드로이드 이어센서 클립 적용 여부 */ androidEarSensorClipFlag; /** * 비인간형 안드로이드 여부 */ androidNonHumanoidFlag; /** * 잡화상점 기능 이용 가능 여부 */ androidShopUsableFlag; constructor(obj) { super(); const { android_name, android_nickname, android_icon, android_description, android_gender, android_grade, android_hair, android_face, android_skin, android_ear_sensor_clip_flag, android_non_humanoid_flag, android_shop_usable_flag, } = obj; this.androidName = android_name; this.androidNickname = android_nickname; this.androidIcon = android_icon; this.androidDescription = android_description; this.androidGender = android_gender; this.androidGrade = android_grade; this.androidHair = new CharacterAndroidEquipmentHairDto(android_hair); this.androidFace = new CharacterAndroidEquipmentFaceDto(android_face); this.androidSkin = android_skin ? new CharacterAndroidEquipmentSkinDto(android_skin) : null; this.androidEarSensorClipFlag = android_ear_sensor_clip_flag; this.androidNonHumanoidFlag = android_non_humanoid_flag; this.androidShopUsableFlag = android_shop_usable_flag; } } /** * 캐릭터 안드로이드 캐시 아이템 컬러링프리즘 정보 */ class CharacterAndroidCashItemEquipmentColoringPrismDto extends characterAndroidEquipment.CharacterAndroidCashItemEquipmentColoringPrismDto { /** * 컬러링프리즘 색상 범위 */ colorRange; /** * 컬러링프리즘 색조 */ hue; /** * 컬러링프리즘 채도 */ saturation; /** * 컬러링프리즘 명도 */ value; constructor(obj) { super(); const { color_range, hue, saturation, value } = obj; this.colorRange = color_range; this.hue = hue; this.saturation = saturation; this.value = value; } } /** * 캐릭터 안드로이드 캐시 아이템 옵션 정보 */ class CharacterAndroidCashItemEquipmentOptionDto extends characterAndroidEquipment.CharacterAndroidCashItemEquipmentOptionDto { /** * 옵션 타입 */ optionType; /** * 옵션 값 */ optionValue; constructor(obj) { super(); const { option_type, option_value } = obj; this.optionType = option_type; this.optionValue = option_value; } } /** * 캐릭터 안드로이드 캐시 아이템 장착 정보 */ class CharacterAndroidCashItemEquipmentDto extends characterAndroidEquipment.CharacterAndroidCashItemEquipmentDto { /** * 안드로이드 캐시 아이템 부위 명 */ cashItemEquipmentPart; /** * 안드로이드 캐시 아이템 슬롯 위치 */ cashItemEquipmentSlot; /** * 안드로이드 캐시 아이템 명 */ cashItemName; /** * 안드로이드 캐시 아이템 아이콘 */ cashItemIcon; /** * 안드로이드 캐시 아이템 설명 */ cashItemDescription; /** * 안드로이드 캐시 아이템 옵션 */ cashItemOption; /** * 안드로이드 캐시 아이템 유효 기간 (KST) */ dateExpire = null; /** * 안드로이드 캐시 아이템 유효 기간 만료 여부 */ isExpired = null; /** * 안드로이드 캐시 아이템 옵션 유효 기간 (KST, 시간 단위 데이터로 분은 일괄 0으로 표기) */ dateOptionExpire = null; /** * 안드로이드 캐시 아이템 옵션 유효 기간 만료 여부 */ isOptionExpired = null; /** * 안드로이드 캐시 아이템 라벨 정보 (스페셜라벨, 레드라벨, 블랙라벨, 마스터라벨) */ cashItemLabel; /** * 안드로이드 캐시 아이템 컬러링프리즘 정보 */ cashItemColoringPrism; /** * 아이템 장착 가능 성별 */ androidItemGender; /** * 프리스타일 쿠폰 적용 여부 (0:미적용, 1:적용) */ freestyleFlag; constructor(obj) { super(); const { cash_item_equipment_part, cash_item_equipment_slot, cash_item_name, cash_item_icon, cash_item_description, cash_item_option, date_expire, date_option_expire, cash_item_label, cash_item_coloring_prism, android_item_gender, freestyle_flag, } = obj; this.cashItemEquipmentPart = cash_item_equipment_part; this.cashItemEquipmentSlot = cash_item_equipment_slot; this.cashItemName = cash_item_name; this.cashItemIcon = cash_item_icon; this.cashItemDescription = cash_item_description; this.cashItemOption = cash_item_option.map((option) => new CharacterAndroidCashItemEquipmentOptionDto(option)); this.cashItemLabel = cash_item_label; this.cashItemColoringPrism = cash_item_coloring_prism ? new CharacterAndroidCashItemEquipmentColoringPrismDto(cash_item_coloring_prism) : null; this.androidItemGender = android_item_gender; this.freestyleFlag = freestyle_flag; if (date_expire === 'expired') { this.isExpired = true; } else if (typeof date_expire === 'string') { this.dateExpire = date_expire ? new Date(date_expire) : null; } if (date_option_expire === 'expired') { this.isOptionExpired = true; } else if (typeof date_option_expire === 'string') { this.dateOptionExpire = date_option_expire ? new Date(date_option_expire) : null; } } /** * 프리스타일 쿠폰 적용 여부 */ get isFreestyleFlag() { return this.freestyleFlag === '1'; } } exports.CharacterAndroidCashItemEquipmentColoringPrismDto = CharacterAndroidCashItemEquipmentColoringPrismDto; exports.CharacterAndroidCashItemEquipmentDto = CharacterAndroidCashItemEquipmentDto; exports.CharacterAndroidCashItemEquipmentOptionDto = CharacterAndroidCashItemEquipmentOptionDto; exports.CharacterAndroidEquipmentDto = CharacterAndroidEquipmentDto; exports.CharacterAndroidEquipmentFaceDto = CharacterAndroidEquipmentFaceDto; exports.CharacterAndroidEquipmentHairDto = CharacterAndroidEquipmentHairDto; exports.CharacterAndroidEquipmentPresetDto = CharacterAndroidEquipmentPresetDto; exports.CharacterAndroidEquipmentSkinDto = CharacterAndroidEquipmentSkinDto;