// Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.180.0 // protoc v5.26.0 // source: game.proto /* eslint-disable */ import { activityConfInfo, activityTimeInfo, altarInfo, building, card, dailyDungeonsInfo, drawAwardInfo, drawInfo, equip, groceryInfo, hero, idNum, mail, manual, popGiftInfo, privilegeCardInfo, quest, rankingInfo, redPointInfo, reward, shopInfo, sidPos, } from "./typedef"; export const protobufPackage = "game"; /** 心跳 */ export interface ping { } /** 心跳响应 */ export interface pingRsp { /** 时间 */ time: number; } /** 登录请求 */ export interface login { /** 服务器id */ sid: number; /** 玩家账号(渠道分配) */ account: string; /** 玩家渠道( 目前填"xiaohei") */ channel: string; } /** 登录相应 */ export interface loginRsp { /** 错误码 */ errno: number; } /** 创角请求 */ export interface create { /** 玩家姓名 */ nickname: string; } /** 创角响应 */ export interface createRsp { /** 错误码 */ errno: number; } /** 玩家信息 */ export interface user { /** 玩家唯一id */ uid: string; /** 玩家名字 */ nickname: string; /** 等级 */ level: number; /** 经验 */ exp: number; /** 头像 */ avatar: number; /** 服务器当前时间 */ svrtime: number; /** 重置姓名的时间 */ renameTime: number; /** 创角时间 */ createtime: number; /** 货币数组 */ currency: idNum[]; } /** 获得奖励消息 */ export interface rewardInfo { /** 特殊标记 */ flags: string; /** 得到的奖励 */ added: reward | undefined; } /** 城镇变化 */ export interface cityChange { /** 变化的数据 */ currency: | idNum | undefined; /** 下次改变时间 */ time: number; } /** 货币支付消息 */ export interface payCurrency { /** 当前的货币数量(支付后的) */ now: idNum[]; /** 支付的货币数量 */ pay: idNum[]; } /** 碎片支付消息 */ export interface payDebrisNty { /** 碎片支付 */ list: idNum[]; } /** 异常抛出 */ export interface exceptionNty { /** 错误码 */ errno: number; } /** 创建订单 */ export interface createOrderNty { /** 订单id */ id: string; /** 计费点id */ cfid: number; } /** 主城数据请求 */ export interface cityData { } /** 主城数据响应 */ export interface cityDataRsp { /** 错误码 */ errno: number; /** 累计时间 */ time: number; /** 建筑数据 */ list: building[]; /** 主城技能列表 */ skillList: number[]; /** 主城技能id */ skillid: number; } /** 主城数据推送 */ export interface cityDataSend { /** 累计时间 */ time: number; /** 建筑数据 */ list: building[]; } /** 建筑升级请求 */ export interface buildingUpgrade { /** 主城id */ id: number; } /** 建筑升级响应 */ export interface buildingUpgradeRsp { /** 错误码 */ errno: number; /** 建筑数据 */ data: building | undefined; } /** 建筑一键收获 */ export interface buildingOneKey { } /** 建筑一键收获 */ export interface buildingOneKeyRsp { /** 错误码 */ errno: number; /** 建筑数据 */ list: building[]; } /** 闯关数据 */ export interface adventureData { } /** 闯关数据 */ export interface adventureDataRsp { /** 错误码 */ errno: number; /** 简单关卡 */ id1: number; /** 通关奖励 */ award1: number[]; /** 困难关卡 */ id2: number; /** 通关奖励 */ award2: number[]; /** 当前冒险关卡类型 */ type: number; /** 当前波次信息 */ layer: number; /** 当前费用 */ cost: number; } /** 闯关开始 */ export interface adventureStart { /** 闯关请求 */ id: number; /** 冒险关卡类型 */ type: number; } /** 闯关开始 */ export interface adventureStartRsp { /** 错误码 */ errno: number; /** 是否开启试玩 */ btrial: boolean; /** 试玩id */ trialId: number; /** 试玩次数 */ trialNum: number; } /** 闯关结束 */ export interface adventureEnd { /** 是否胜利 */ win: boolean; /** 杀怪数量 */ monsterNum: number; /** 杀boss数量 */ bossNum: number; /** 杀精英数量 */ eliteNum: number; } /** 闯关结束 */ export interface adventureEndRsp { /** 错误码 */ errno: number; } /** 开始波次 */ export interface adventureLayer { /** 波次 */ layer: number; /** 费用 */ cost: number; /** 杀怪数量 */ monsterNum: number; /** 杀boss数量 */ bossNum: number; /** 杀精英数量 */ eliteNum: number; } /** 开始波次 */ export interface adventureLayerRsp { /** 错误码 */ errno: number; } /** 扫荡 */ export interface adventureSweep { /** 关卡id */ id: number; /** 冒险关卡类型 */ type: number; } /** 扫荡 */ export interface adventureSweepRsp { /** 错误码 */ errno: number; } /** 领取通关奖励 */ export interface adventurePassAward { /** 关卡id */ id: number; /** 冒险关卡类型 */ type: number; } /** 领取通关奖励 */ export interface adventurePassAwardRsp { /** 错误码 */ errno: number; /** 关卡id */ id: number; /** 冒险关卡类型 */ type: number; } /** 冒险广告奖励 */ export interface adventureAdAward { } /** 冒险广告奖励 */ export interface adventureAdAwardRsp { /** 错误码 */ errno: number; } /** 冒险试用英雄 */ export interface adventureTrial { } /** 冒险试用英雄 */ export interface adventureTrialRsp { /** 错误码 */ errno: number; } /** 获取邮件数据 */ export interface getMail { } /** 获取邮件数据 */ export interface getMailRsp { /** 错误码 */ errno: number; /** 邮件数据 */ list: mail[]; } /** 获取邮件奖励 */ export interface getMailGoods { /** 需要取出的id */ list: string[]; /** 是否一键领取 */ bonekey: boolean; } /** 获取邮件奖励 */ export interface getMailGoodsRsp { /** 错误码 */ errno: number; /** 取出的id */ list: string[]; } /** 删除邮件 */ export interface delMail { /** 需要删除的id */ list: string[]; } /** 删除邮件 */ export interface delMailRsp { /** 错误码 */ errno: number; /** 删除的id */ list: string[]; } /** 标记为已读 */ export interface flagMail { /** 需要标记的id */ list: string[]; } /** 标记为已读 */ export interface flagMailRsp { /** 错误码 */ errno: number; } /** 发送邮件sc */ export interface sendMail { /** 邮件数据 */ list: mail[]; } /** 简单的邮件数据 */ export interface simpleMail { /** 邮件的数量 */ num: number; /** 未读邮件数量 */ noread: number; /** 有奖励的邮件(可能已经读过但没领取奖励) */ needread: number; } /** 上阵数据 */ export interface embattleGetData { } /** 上阵数据 */ export interface embattleGetDataRsp { /** 错误码 */ errno: number; /** 角色位置信息 */ list: sidPos[]; /** 卡牌位置信息 */ cardList: sidPos[]; } /** 角色上阵 */ export interface embattleBattle { /** ture 是技能 */ skill: boolean; /** 角色唯一id(为空时,检查下阵逻辑) */ sid: string; /** 从1开始 */ pos: number; } /** 角色上阵 */ export interface embattleBattleRsp { /** 错误码 */ errno: number; /** 角色位置信息 */ list: sidPos[]; /** 卡牌位置信息 */ cardList: sidPos[]; } /** 角色背包数据 */ export interface heroGetData { } /** 角色背包数据 */ export interface heroGetDataRsp { /** 错误码 */ errno: number; /** 角色数据 */ list: hero[]; } /** 角色升级 */ export interface heroUpgrade { /** 角色唯一id */ sid: string; /** 升几级 */ num: number; } /** 角色升级 */ export interface heroUpgradeRsp { /** 错误码 */ errno: number; /** 角色数据 */ data: hero | undefined; } /** 角色突破 */ export interface heroUpgradeStar { /** 角色唯一id */ sid: string; /** 同名卡唯一id */ same: string[]; /** 非同名卡唯一id */ other: string[]; /** 替代品货币 */ currency: idNum | undefined; } /** 角色突破 */ export interface heroUpgradeStarRsp { /** 错误码 */ errno: number; /** 角色数据 */ data: | hero | undefined; /** 同名卡唯一id */ same: string[]; /** 非同名卡唯一id */ other: string[]; /** 替代品货币 */ currency: idNum | undefined; } /** 一键突破 */ export interface heroOnekeyUpgradeStar { } /** 一键突破 */ export interface heroOnekeyUpgradeStarRsp { /** 错误码 */ errno: number; /** 删除的角色 */ delList: string[]; /** 变化的角色 */ changeList: hero[]; } /** 角色重置 */ export interface heroReset { /** 是否重置等级 */ level: boolean; /** 重置角色唯一id */ sid: string; } /** 角色重置 */ export interface heroResetRsp { /** 错误码 */ errno: number; /** 角色数据 */ data: hero | undefined; } /** 角色穿戴 */ export interface heroWearEquip { /** 角色sid */ sid: string; /** 装备信息 */ list: string[]; } /** 角色穿戴 */ export interface heroWearEquipRsp { /** 错误码 */ errno: number; /** 装备信息 */ list: string[]; /** 角色数据 */ data: hero | undefined; } /** 角色穿戴 */ export interface heroChangeNty { /** 英雄信息 */ list: hero[]; } /** 技能卡牌数据 */ export interface skillCardGetData { } /** 技能卡牌数据 */ export interface skillCardGetDataRsp { /** 错误码 */ errno: number; /** 技能卡牌数据 */ list: card[]; } /** 技能卡牌升级 */ export interface skillCardUpgrade { /** 技能卡牌唯一id */ sid: string; /** 升几级 */ num: number; } /** 技能卡牌升级 */ export interface skillCardUpgradeRsp { /** 错误码 */ errno: number; /** 技能卡牌数据 */ data: card | undefined; } /** 技能卡牌突破 */ export interface skillCardUpgradeStar { /** 技能卡牌唯一id */ sid: string; } /** 技能卡牌突破 */ export interface skillCardUpgradeStarRsp { /** 错误码 */ errno: number; /** 技能卡牌数据 */ data: card | undefined; } /** 队伍数据 */ export interface roleGetData { } /** 队伍数据 */ export interface roleGetDataRsp { /** 错误码 */ errno: number; /** 等级 */ level: number; /** 经验 */ exp: number; } /** 队伍等级提升 */ export interface roleUpgrade { } /** 队伍等级提升 */ export interface roleUpgradeRsp { /** 错误码 */ errno: number; /** 等级 */ level: number; /** 经验 */ exp: number; } /** 改名 */ export interface roleRename { /** 名字 */ name: string; } /** 改名 */ export interface roleRenameRsp { /** 错误码 */ errno: number; /** 名字 */ name: string; /** 重置姓名的时间 */ time: number; } /** 碎片背包数据 */ export interface debrisGetData { } /** 碎片背包数据 */ export interface debrisGetDataRsp { /** 错误码 */ errno: number; /** 数据 */ list: idNum[]; } /** 碎片合成 */ export interface debrisMerge { /** 碎片id */ id: number; } /** 碎片合成 */ export interface debrisMergeRsp { /** 错误码 */ errno: number; } /** 装备背包数据 */ export interface equipGetData { } /** 装备背包数据 */ export interface equipGetDataRsp { /** 错误码 */ errno: number; /** 装备数据 */ list: equip[]; } /** 装备升级 */ export interface equipUpgrade { /** 装备唯一id */ sid: string; /** 升几级 */ num: number; } /** 装备升级 */ export interface equipUpgradeRsp { /** 错误码 */ errno: number; /** 装备数据 */ data: equip | undefined; } /** 装备突破 */ export interface equipUpgradeStar { /** 装备唯一id */ sid: string; /** 同名卡唯一id */ same: string[]; /** 非同名卡唯一id */ other: string[]; /** 替代品货币 */ currency: idNum | undefined; } /** 装备突破 */ export interface equipUpgradeStarRsp { /** 错误码 */ errno: number; /** 装备数据 */ data: | equip | undefined; /** 同名卡唯一id */ same: string[]; /** 非同名卡唯一id */ other: string[]; /** 替代品货币 */ currency: idNum | undefined; } /** 一键突破 */ export interface equipOnekeyUpgradeStar { } /** 一键突破 */ export interface equipOnekeyUpgradeStarRsp { /** 错误码 */ errno: number; /** 删除的装备 */ delList: string[]; /** 变化的装备 */ changeList: equip[]; } /** 装备重置 */ export interface equipReset { /** 是否重置等级 */ level: boolean; /** 重置装备唯一id */ sid: string; } /** 装备重置 */ export interface equipResetRsp { /** 错误码 */ errno: number; /** 装备数据 */ data: equip | undefined; } /** 装备重置 */ export interface equipChangeNty { /** 英雄信息 */ list: equip[]; } /** 天赋数据 */ export interface talentGetData { } /** 天赋数据 */ export interface talentGetDataRsp { /** 错误码 */ errno: number; /** 天赋1 */ id1: number; /** 天赋2 */ id2: number; } /** 天赋激活 */ export interface talentActivate { /** 激活id */ id: number; } /** 天赋激活 */ export interface talentActivateRsp { /** 错误码 */ errno: number; /** 激活id */ id: number; } /** 签到数据 */ export interface signInGetData { } /** 签到数据 */ export interface signInGetDataRsp { /** 错误码 */ errno: number; } /** 签到奖励 */ export interface signInAward { /** 第几天 */ day: number; } /** 签到奖励 */ export interface signInAwardRsp { /** 错误码 */ errno: number; /** 第几天 */ day: number; /** 领奖数据 */ award: number; } /** 新一轮签到数据 */ export interface signInNty { /** 是否开启 */ open: boolean; /** 第几天 */ day: number; /** 领奖数据 */ award: number; /** 当前轮次 */ round: number; } /** 任务数据 */ export interface questGetData { } /** 任务数据 */ export interface questGetDataRsp { /** 错误码 */ errno: number; /** 日常刷新时等级 */ dlv: number; /** 周常刷新时等级 */ wlv: number; /** 日常活跃领取 */ daward: number; /** 周常活跃领取 */ waward: number; /** 日常任务 */ daily: quest[]; /** 周常任务 */ weekly: quest[]; /** 成就任务 */ achievement: quest[]; /** 主线任务 */ mainQuest: quest | undefined; } /** 领取任务奖励 */ export interface questGetAward { /** 任务id */ id: number; } /** 领取任务奖励 */ export interface questGetAwardRsp { /** 错误码 */ errno: number; /** 任务id */ id: number; /** 任务数据变化(成就任务这里会变为下个成就任务) */ data: quest | undefined; } /** 领取活跃奖励 */ export interface questActiveAward { /** 1日常任务 2周常任务 */ type: number; } /** 领取活跃奖励 */ export interface questActiveAwardRsp { /** 错误码 */ errno: number; /** 1日常任务 2周常任务 */ type: number; /** 已领取的活跃奖励 */ award: number; } /** 任务 */ export interface questCmplateNotify { /** 任务数据变化(成就任务这里会变为下个成就任务) */ data: quest | undefined; } /** 战令数据 */ export interface manualGetData { /** 模块id */ moduleid: number; } /** 战令数据 */ export interface manualGetDataRsp { /** 错误码 */ errno: number; /** 是否开启 */ open: boolean; /** 开启时间 */ openTime: number; /** 等级 */ level: number; /** 经验 */ exp: number; /** 轮次 */ round: number; /** 战令数据 */ list: manual[]; /** 模块id */ moduleid: number; } /** 战令购买经验 */ export interface manualBuyExp { /** 模块id */ moduleid: number; } /** 战令购买经验 */ export interface manualBuyExpRsp { /** 错误码 */ errno: number; /** 等级 */ level: number; /** 经验 */ exp: number; /** 模块id */ moduleid: number; } /** 战令领取奖励 */ export interface manualGetAward { /** 模块id */ moduleid: number; } /** 战令领取奖励 */ export interface manualGetAwardRsp { /** 错误码 */ errno: number; /** 已领取的奖励 */ award: number; /** 模块id */ moduleid: number; } /** 战令通知 */ export interface manualNotify { /** 是否开启 */ open: boolean; /** 开启时间 */ openTime: number; /** 等级 */ level: number; /** 经验 */ exp: number; /** 轮次 */ round: number; /** 战令数据 */ list: manual[]; /** 模块id */ moduleid: number; } /** 购买战令 */ export interface manualBuy { /** 礼包id */ giftid: number; /** 模块id */ moduleid: number; } /** 购买战令 */ export interface manualBuyRsp { /** 错误码 */ errno: number; /** 模块id */ moduleid: number; } /** 抽奖 */ export interface draw { /** 抽奖类型 1高级英雄 2普通英雄 3装备 */ drawType: number; /** 抽奖付费方式 1免费 2召唤卷 3其它货币 */ payType: number; /** 数量 */ num: number; } /** 抽奖 */ export interface drawRsp { /** 错误码 */ errno: number; /** 抽奖类型 */ drawType: number; /** 每天抽奖次数 */ daily: number; /** 已免费次数 */ free: number; /** 剩余多少次出特殊奖励列表 */ list: number[]; /** 抽奖数据 */ awardList: drawAwardInfo[]; } /** 抽奖数据 */ export interface drawGetData { } /** 抽奖数据 */ export interface drawGetDataRsp { /** 错误码 */ errno: number; /** 高级英雄抽奖数据 */ hero: | drawInfo | undefined; /** 普通英雄抽奖数据 */ hero2: | drawInfo | undefined; /** 装备锻造数据 */ equip: drawInfo | undefined; } /** 商店数据 */ export interface shopData { } /** 商店数据 */ export interface shopDataRsp { /** 错误码 */ errno: number; /** 商店数据 */ list: shopInfo[]; } /** 商店购买 */ export interface shopBuy { /** 商店类型 */ type: number; /** 商品id */ id: number; /** 商品数量 */ num: number; } /** 商店购买 */ export interface shopBuyRsp { /** 错误码 */ errno: number; } /** 商店购买 */ export interface shopNotify { /** 商店类型 */ type: number; /** 商品id */ id: number; /** 已购买数量 */ num: number; } /** 排行榜数据 */ export interface rankingData { /** 排行类型 1冒险排行 2战力排行 */ type: number; } /** 排行榜数据 */ export interface rankingDataRsp { /** 错误码 */ errno: number; /** 排行类型 1冒险排行 2战力排行 */ type: number; /** 排行数据 */ list: rankingInfo[]; /** 自己的数据(没有就是未上榜) */ myslef: rankingInfo | undefined; } /** 杂货店数据 */ export interface groceryData { /** 1体力购买 2金币购买 */ type: number; } /** 杂货店数据 */ export interface groceryDataRsp { /** 错误码 */ errno: number; /** 杂货店数据 */ data: groceryInfo | undefined; } /** 杂货店购买 */ export interface groceryBuy { /** 1体力购买 2金币购买 */ type: number; /** 免费还是付费 */ free: boolean; } /** 杂货店购买 */ export interface groceryBuyRsp { /** 错误码 */ errno: number; /** 杂货店数据 */ data: groceryInfo | undefined; } /** 祭坛数据 */ export interface altarData { } /** 祭坛数据 */ export interface altarDataRsp { /** 错误码 */ errno: number; /** 前5英雄id */ baseList: string[]; /** 上阵英雄数据 */ list: altarInfo[]; /** 购买的格子数量 */ buyNum: number; /** 可免费置换次数 */ equipFree: number; /** 可免费置换次数 */ heroFree: number; } /** 祭坛上阵 */ export interface altarBattle { /** 上阵位置 */ pos: number; /** 上阵英雄唯一id */ sid: string; } /** 祭坛上阵 */ export interface altarBattleRsp { /** 错误码 */ errno: number; /** 上阵位置 */ pos: number; /** 上阵位置信息 */ data: altarInfo | undefined; } /** 祭坛置换 */ export interface altarExchange { /** 1英雄置换 2装备置换 */ type: number; /** 唯一id */ sid: string; } /** 祭坛置换 */ export interface altarExchangeRsp { /** 错误码 */ errno: number; /** 1英雄置换 2装备置换 */ type: number; /** 唯一id */ sid: string; /** 置换后的模板id */ id: number; } /** 祭坛置换确认 */ export interface altarExchangeConfirm { /** 1英雄置换 2装备置换 */ type: number; /** 唯一id */ sid: string; /** 是否置换 */ change: boolean; } /** 祭坛置换确认 */ export interface altarExchangeConfirmRsp { /** 错误码 */ errno: number; } /** 祭坛购买上阵位 */ export interface altarBuyBattleSpace { } /** 祭坛购买上阵位 */ export interface altarBuyBattleSpaceRsp { /** 错误码 */ errno: number; /** 上阵位置 */ pos: number; /** 上阵位置信息 */ data: altarInfo | undefined; } /** 祭坛重置上阵位时间 */ export interface altarResetCd { /** 上阵位置 */ pos: number; } /** 祭坛重置上阵位时间 */ export interface altarResetCdRsp { /** 错误码 */ errno: number; /** 上阵位置 */ pos: number; /** 上阵位置信息 */ data: altarInfo | undefined; } /** 遗迹数据 */ export interface relicData { } /** 遗迹数据 */ export interface relicDataRsp { /** 错误码 */ errno: number; } /** 遗迹前往下个位置 */ export interface relicNextPos { pos: number; } /** 遗迹前往下个位置 */ export interface relicNextPosRsp { /** 错误码 */ errno: number; } /** 遗迹前往下一层 */ export interface relicNextLayer { } /** 遗迹前往下一层 */ export interface relicNextLayerRsp { /** 错误码 */ errno: number; } /** 遗迹选择buff */ export interface relicSelectBuff { } /** 遗迹选择buff */ export interface relicSelectBuffRsp { /** 错误码 */ errno: number; } /** 遗迹重置 */ export interface relicReset { difficulty: number; } /** 遗迹重置 */ export interface relicResetRsp { /** 错误码 */ errno: number; } /** 遗迹事件选择 */ export interface relicEventSelect { /** 事件类型 2战斗 3温泉 4buff选择 */ type: number; /** 战斗是否胜利 */ win: boolean; /** 战斗消耗费用 */ cost: number; /** 选择 */ select: number; } /** 遗迹事件选择 */ export interface relicEventSelectRsp { /** 错误码 */ errno: number; } /** 遗迹数据推送 */ export interface relicDataNty { /** 历史最高难度 */ maxDiff: number; /** 当前难度 */ curDiff: number; /** 已选buff */ buffList: number[]; /** 所在层级 */ layer: number; /** 当前位置 */ pos: number; /** 当前状态 */ cost: number; /** 状态 0 结束 1选择buff */ state: number; /** 可重置的时间 */ resetTime: number; /** 历史路径 */ posList: number[]; /** 驻军关卡关卡id */ battleInfo: number[]; } /** 遗迹事件推送 */ export interface relicEventNty { /** 事件类型 2战斗 3温泉 4buff选择 */ type: number; /** 挑战id */ battleId: number; /** 挑战类型 1普通 2精英 3boss 7驻军 */ battleType: number; /** 可选择的buff */ selectBuff: number[]; } /** 活动时间 */ export interface activityTimeListNty { /** 活动时间列表 */ list: activityTimeInfo[]; } /** 活动配置 */ export interface activityGetConfList { list: string[]; } /** 活动配置 */ export interface activityGetConfListRsp { /** 错误码 */ errno: number; list: activityConfInfo[]; } export interface activityGetConfNty { list: number[]; } /** 特权卡数据 */ export interface privilegeCardData { } /** 特权卡数据 */ export interface privilegeCardDataRsp { /** 错误码 */ errno: number; /** 特权卡数据 */ list: privilegeCardInfo[]; } /** 特权卡购买 */ export interface privilegeCardBuy { /** 模块id */ moduleid: number; } /** 特权卡购买 */ export interface privilegeCardBuyRsp { /** 错误码 */ errno: number; } /** 特权卡解锁 */ export interface privilegeCardUnlockNty { /** 解锁特权卡数据 */ data: privilegeCardInfo | undefined; } /** 特权卡奖励 */ export interface privilegeCardAward { /** 模块id */ moduleid: number; } /** 特权卡奖励 */ export interface privilegeCardAwardRsp { /** 模块id */ errno: number; /** 模块id */ moduleid: number; /** 模块id */ award: boolean; } /** 宝箱奖励 */ export interface boxGetAward { /** 奖励宝箱id */ id: number; /** 奖励id */ select: number; /** 宝箱类型 */ type: number; /** 数量 */ num: number; } /** 宝箱奖励 */ export interface boxGetAwardRsp { /** 模块id */ errno: number; /** 宝箱类型 */ type: number; } export interface firstRechargeData { /** 模块id */ moduleid: number; } /** 首充礼包数据 */ export interface firstRechargeDataRsp { /** 错误码 */ errno: number; /** 模块id */ moduleid: number; /** 是否购买 */ state: boolean; /** 当前第几天 */ day: number; /** 奖励领取数据按位 */ award: number; } /** 首充礼包购买 */ export interface firstRechargeBuy { /** 模块id */ moduleid: number; } /** 首充礼包购买 */ export interface firstRechargeBuyRsp { /** 错误码 */ errno: number; /** 模块id */ moduleid: number; } /** 首充礼包奖励 */ export interface firstRechargeAward { /** 模块id */ moduleid: number; /** 领取第天的奖励 */ day: number; } /** 首充礼包奖励 */ export interface firstRechargeAwardRsp { /** 错误码 */ errno: number; /** 模块id */ moduleid: number; /** 领奖数据 */ award: number; } /** 首充礼包推送 */ export interface firstRechargeNty { /** 模块id */ moduleid: number; /** 是否购买 */ state: boolean; /** 当前第几天 */ day: number; /** 奖励领取数据按位 */ award: number; } /** 日常副本数据 */ export interface dailyDungeonsData { } /** 日常副本数据 */ export interface dailyDungeonsDataRsp { /** 错误码 */ errno: number; /** 日常副本数据 */ list: dailyDungeonsInfo[]; } /** 日常副本战斗开始 */ export interface dailyDungeonsStart { type: number; diff: number; } /** 日常副本战斗开始 */ export interface dailyDungeonsStartRsp { /** 错误码 */ errno: number; awardList: idNum[]; } /** 日常副本战斗结束 */ export interface dailyDungeonsEnd { /** 是否胜利 */ win: boolean; /** 杀怪数量 */ monsterNum: number; /** 杀boss数量 */ bossNum: number; /** 杀精英数量 */ eliteNum: number; } /** 日常副本战斗结束 */ export interface dailyDungeonsEndRsp { /** 错误码 */ errno: number; /** 副本数据 */ data: dailyDungeonsInfo | undefined; } /** 日常副本扫荡 */ export interface dailyDungeonsSweep { type: number; diff: number; } /** 日常副本扫荡 */ export interface dailyDungeonsSweepRsp { /** 错误码 */ errno: number; /** 副本数据 */ data: dailyDungeonsInfo | undefined; } /** 冒险礼包数据 */ export interface advGiftData { } /** 冒险礼包数据 */ export interface advGiftDataRsp { /** 错误码 */ errno: number; } /** 冒险礼包购买 */ export interface advGiftBuy { /** 礼包id */ id: number; } /** 冒险礼包购买 */ export interface advGiftBuyRsp { /** 错误码 */ errno: number; } /** 冒险礼包推送 */ export interface advGiftNty { /** 已购买的礼包数据 */ list: idNum[]; } /** 弹窗礼包数据 */ export interface popGiftData { } /** 弹窗礼包数据 */ export interface popGiftDataRsp { /** 错误码 */ errno: number; /** 弹窗礼包数据 */ list: popGiftInfo[]; } /** 弹窗礼包购买 */ export interface popGiftBuy { /** 礼包id */ id: number; } /** 弹窗礼包购买 */ export interface popGiftBuyRsp { /** 错误码 */ errno: number; } /** 弹窗礼包推送 */ export interface popGiftNty { /** 弹窗礼包数据 */ data: popGiftInfo | undefined; } /** 弹窗礼包数据变化 */ export interface popGiftChangeNty { /** 弹窗礼包数据 */ data: popGiftInfo | undefined; } /** 基金数据 */ export interface fundData { /** 模块id */ moduleid: number; } /** 基金数据 */ export interface fundDataRsp { /** 错误码 */ errno: number; /** 模块id */ moduleid: number; /** 是否购买 */ state: boolean; /** 领奖数据 */ award: number; /** 领奖数据 */ freeAward: number; /** 当前进度 */ progress: number; } /** 基金购买 */ export interface fundBuy { /** 模块id */ moduleid: number; } /** 基金购买 */ export interface fundBuyRsp { /** 错误码 */ errno: number; /** 模块id */ moduleid: number; } /** 基金奖励 */ export interface fundAward { /** 模块id */ moduleid: number; } /** 基金奖励 */ export interface fundAwardRsp { /** 错误码 */ errno: number; /** 模块id */ moduleid: number; /** 领奖数据 */ award: number; /** 领奖数据 */ freeAward: number; } /** 基金推送 */ export interface fundNty { /** 模块id */ moduleid: number; /** 是否购买 */ state: boolean; /** 领奖数据 */ award: number; /** 领奖数据 */ freeAward: number; /** 当前进度 */ progress: number; } /** 连续充值数据 */ export interface keepRechargeData { } /** 连续充值数据 */ export interface keepRechargeDataRsp { /** 错误码 */ errno: number; /** 连续充值天数 */ day: number; /** 当天充值数量 */ num: number; /** 领取奖励信息(按位存) */ award: number; } /** 连续充值奖励 */ export interface keepRechargeAward { /** 领取奖励的天数 */ day: number; } /** 连续充值奖励 */ export interface keepRechargeAwardRsp { /** 错误码 */ errno: number; /** 领取奖励信息(按位存) */ award: number; } /** 红点数据 */ export interface getRedPointList { } /** 红点数据 */ export interface getRedPointListRsp { /** 错误码 */ errno: number; /** 红点数据 */ list: redPointInfo[]; } /** 充值结果 */ export interface rechargeResult { /** 服务器订单号 */ orderId: string; /** 支付平台返回的订单号 */ payOrderId: string; /** 支付平台返回的purchaseToken */ purchaseToken: string; /** 支付方式 */ payType: string; /** 计费点 */ cfgId: number; } /** 充值结果 */ export interface rechargeResultRsp { /** 错误码 */ errno: number; } /** 领取在线奖励 */ export interface onlineAwardGetAward { /** 领取第几个在线奖励 */ pos: number; } /** 领取在线奖励 */ export interface onlineAwardGetAwardRsp { /** 错误码 */ errno: number; /** 领取奖励数据 */ award: number; } /** 在线奖励数据 */ export interface onlineAwardGetData { } /** 在线奖励数据 */ export interface onlineAwardGetDataRsp { /** 错误码 */ errno: number; } /** 在线奖励数据推送 */ export interface onlineAwardNty { /** 是否开启 */ open: boolean; /** 在线时长 */ time: number; /** 领取奖励数据 */ award: number; } /** 战斗加速数据 */ export interface speedUpData { } /** 战斗加速数据 */ export interface speedUpDataRsp { /** 错误码 */ errno: number; /** 剩余加速时间 */ time: number; } /** 战斗加速时间购买 */ export interface speedUpBuy { /** 是否广告观看 */ free: boolean; } /** 战斗加速时间购买 */ export interface speedUpBuyRsp { /** 错误码 */ errno: number; /** 剩余加速时间 */ time: number; } /** 主城技能升级 */ export interface citySkillUpgrade { /** 技能id */ id: number; } /** 主城技能升级 */ export interface citySkillUpgradeRsp { /** 错误码 */ errno: number; /** 技能id */ id: number; } /** 主城技能上阵 */ export interface citySkillBattle { /** 技能id */ id: number; } /** 主城技能上阵 */ export interface citySkillBattleRsp { /** 错误码 */ errno: number; /** 技能id */ id: number; } /** 建筑探索 */ export interface buildingExplore { /** 建筑id */ id: number; } /** 建筑探索 */ export interface buildingExploreRsp { /** 错误码 */ errno: number; /** 建筑数据 */ data: building | undefined; } /** 领取自动探索奖励 */ export interface buildingAutoExploreAward { /** 建筑id */ id: number; } /** 领取自动探索奖励 */ export interface buildingAutoExploreAwardRsp { /** 错误码 */ errno: number; /** 建筑数据 */ data: building | undefined; } /** 建筑探索上阵 */ export interface buildingExploreBattle { /** 建筑id */ id: number; /** 上阵数据 */ list: string[]; } /** 建筑探索上阵 */ export interface buildingExploreBattleRsp { /** 错误码 */ errno: number; /** 建筑数据 */ data: building | undefined; } /** 建筑自动探索设置 */ export interface buildingAutoExploreOption { /** 建筑id */ id: number; /** 是否开启 */ open: boolean; } /** 建筑自动探索设置 */ export interface buildingAutoExploreOptionRsp { /** 错误码 */ errno: number; /** 建筑数据 */ data: building | undefined; } /** 等级礼包数据 */ export interface levelGiftData { } /** 等级礼包数据 */ export interface levelGiftDataRsp { /** 错误码 */ errno: number; } /** 等级礼包购买 */ export interface levelGiftBuy { /** 礼包id */ id: number; } /** 等级礼包购买 */ export interface levelGiftBuyRsp { /** 错误码 */ errno: number; } /** 等级礼包推送 */ export interface levelGiftNty { /** 已购买的礼包数据 */ list: idNum[]; } /** 等级礼包取消红点 */ export interface levelGiftDelRedPoint { } /** 等级礼包取消红点 */ export interface levelGiftDelRedPointRsp { /** 错误码 */ errno: number; } /** 千抽活动数据 */ export interface lotteryData { } /** 千抽活动数据 */ export interface lotteryDataRsp { /** 错误码 */ errno: number; } /** 千抽活动奖励 */ export interface lotteryAward { /** 是否为免费奖励 */ free: boolean; } /** 千抽活动奖励 */ export interface lotteryAwardRsp { /** 错误码 */ errno: number; /** 是否为免费奖励 */ free: boolean; /** 领取进度 */ award: number; } /** 千抽活动购买 */ export interface lotteryBuy { } /** 千抽活动购买 */ export interface lotteryBuyRsp { /** 错误码 */ errno: number; } /** 千抽活动推送 */ export interface lotteryNty { /** 状态0未开启 1开启 2关闭 */ state: number; /** 免费奖励领取进度 */ free: number; /** 付费奖励领取进度-1为未解锁. */ award: number; /** 第几天 */ day: number; } /** 开服排行活动数据 */ export interface actRankData { /** 排行活动id */ id: number; } /** 开服排行活动数据 */ export interface actRankDataRsp { /** 错误码 */ errno: number; /** 排行数据 */ list: rankingInfo[]; } /** 开服宝藏活动数据 */ export interface treasureGetData { } /** 开服宝藏活动数据 */ export interface treasureGetDataRsp { /** 错误码 */ errno: number; /** 购买次数 */ buy: number; /** 签到进度 */ sign: number; /** 已抽到数据 */ list: number[]; /** 是否抽到大奖 */ treasure: boolean; } /** 开服宝藏活动抽奖 */ export interface treasureDraw { } /** 开服宝藏活动抽奖 */ export interface treasureDrawRsp { /** 错误码 */ errno: number; /** 0为大奖 */ pos: number; } /** 开服宝藏活动签到 */ export interface treasureSign { } /** 开服宝藏活动签到 */ export interface treasureSignRsp { /** 错误码 */ errno: number; /** 签到进度 */ sign: number; } /** 开服宝藏活动购买 */ export interface treasureBuy { } /** 开服宝藏活动购买 */ export interface treasureBuyRsp { /** 错误码 */ errno: number; /** 购买次数 */ buy: number; } function createBaseping(): ping { return {}; } export const ping = { fromJSON(_: any): ping { return {}; }, toJSON(_: ping): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): ping { return ping.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): ping { const message = createBaseping(); return message; }, }; function createBasepingRsp(): pingRsp { return { time: 0 }; } export const pingRsp = { fromJSON(object: any): pingRsp { return { time: isSet(object.time) ? globalThis.Number(object.time) : 0 }; }, toJSON(message: pingRsp): unknown { const obj: any = {}; if (message.time !== 0) { obj.time = Math.round(message.time); } return obj; }, create, I>>(base?: I): pingRsp { return pingRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): pingRsp { const message = createBasepingRsp(); message.time = object.time ?? 0; return message; }, }; function createBaselogin(): login { return { sid: 0, account: "", channel: "" }; } export const login = { fromJSON(object: any): login { return { sid: isSet(object.sid) ? globalThis.Number(object.sid) : 0, account: isSet(object.account) ? globalThis.String(object.account) : "", channel: isSet(object.channel) ? globalThis.String(object.channel) : "", }; }, toJSON(message: login): unknown { const obj: any = {}; if (message.sid !== 0) { obj.sid = Math.round(message.sid); } if (message.account !== "") { obj.account = message.account; } if (message.channel !== "") { obj.channel = message.channel; } return obj; }, create, I>>(base?: I): login { return login.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): login { const message = createBaselogin(); message.sid = object.sid ?? 0; message.account = object.account ?? ""; message.channel = object.channel ?? ""; return message; }, }; function createBaseloginRsp(): loginRsp { return { errno: 0 }; } export const loginRsp = { fromJSON(object: any): loginRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: loginRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): loginRsp { return loginRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): loginRsp { const message = createBaseloginRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBasecreate(): create { return { nickname: "" }; } export const create = { fromJSON(object: any): create { return { nickname: isSet(object.nickname) ? globalThis.String(object.nickname) : "" }; }, toJSON(message: create): unknown { const obj: any = {}; if (message.nickname !== "") { obj.nickname = message.nickname; } return obj; }, create, I>>(base?: I): create { return create.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): create { const message = createBasecreate(); message.nickname = object.nickname ?? ""; return message; }, }; function createBasecreateRsp(): createRsp { return { errno: 0 }; } export const createRsp = { fromJSON(object: any): createRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: createRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): createRsp { return createRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): createRsp { const message = createBasecreateRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaseuser(): user { return { uid: "", nickname: "", level: 0, exp: 0, avatar: 0, svrtime: 0, renameTime: 0, createtime: 0, currency: [] }; } export const user = { fromJSON(object: any): user { return { uid: isSet(object.uid) ? globalThis.String(object.uid) : "", nickname: isSet(object.nickname) ? globalThis.String(object.nickname) : "", level: isSet(object.level) ? globalThis.Number(object.level) : 0, exp: isSet(object.exp) ? globalThis.Number(object.exp) : 0, avatar: isSet(object.avatar) ? globalThis.Number(object.avatar) : 0, svrtime: isSet(object.svrtime) ? globalThis.Number(object.svrtime) : 0, renameTime: isSet(object.renameTime) ? globalThis.Number(object.renameTime) : 0, createtime: isSet(object.createtime) ? globalThis.Number(object.createtime) : 0, currency: globalThis.Array.isArray(object?.currency) ? object.currency.map((e: any) => idNum.fromJSON(e)) : [], }; }, toJSON(message: user): unknown { const obj: any = {}; if (message.uid !== "") { obj.uid = message.uid; } if (message.nickname !== "") { obj.nickname = message.nickname; } if (message.level !== 0) { obj.level = Math.round(message.level); } if (message.exp !== 0) { obj.exp = Math.round(message.exp); } if (message.avatar !== 0) { obj.avatar = Math.round(message.avatar); } if (message.svrtime !== 0) { obj.svrtime = Math.round(message.svrtime); } if (message.renameTime !== 0) { obj.renameTime = Math.round(message.renameTime); } if (message.createtime !== 0) { obj.createtime = Math.round(message.createtime); } if (message.currency?.length) { obj.currency = message.currency.map((e) => idNum.toJSON(e)); } return obj; }, create, I>>(base?: I): user { return user.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): user { const message = createBaseuser(); message.uid = object.uid ?? ""; message.nickname = object.nickname ?? ""; message.level = object.level ?? 0; message.exp = object.exp ?? 0; message.avatar = object.avatar ?? 0; message.svrtime = object.svrtime ?? 0; message.renameTime = object.renameTime ?? 0; message.createtime = object.createtime ?? 0; message.currency = object.currency?.map((e) => idNum.fromPartial(e)) || []; return message; }, }; function createBaserewardInfo(): rewardInfo { return { flags: "", added: undefined }; } export const rewardInfo = { fromJSON(object: any): rewardInfo { return { flags: isSet(object.flags) ? globalThis.String(object.flags) : "", added: isSet(object.added) ? reward.fromJSON(object.added) : undefined, }; }, toJSON(message: rewardInfo): unknown { const obj: any = {}; if (message.flags !== "") { obj.flags = message.flags; } if (message.added !== undefined) { obj.added = reward.toJSON(message.added); } return obj; }, create, I>>(base?: I): rewardInfo { return rewardInfo.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): rewardInfo { const message = createBaserewardInfo(); message.flags = object.flags ?? ""; message.added = (object.added !== undefined && object.added !== null) ? reward.fromPartial(object.added) : undefined; return message; }, }; function createBasecityChange(): cityChange { return { currency: undefined, time: 0 }; } export const cityChange = { fromJSON(object: any): cityChange { return { currency: isSet(object.currency) ? idNum.fromJSON(object.currency) : undefined, time: isSet(object.time) ? globalThis.Number(object.time) : 0, }; }, toJSON(message: cityChange): unknown { const obj: any = {}; if (message.currency !== undefined) { obj.currency = idNum.toJSON(message.currency); } if (message.time !== 0) { obj.time = Math.round(message.time); } return obj; }, create, I>>(base?: I): cityChange { return cityChange.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): cityChange { const message = createBasecityChange(); message.currency = (object.currency !== undefined && object.currency !== null) ? idNum.fromPartial(object.currency) : undefined; message.time = object.time ?? 0; return message; }, }; function createBasepayCurrency(): payCurrency { return { now: [], pay: [] }; } export const payCurrency = { fromJSON(object: any): payCurrency { return { now: globalThis.Array.isArray(object?.now) ? object.now.map((e: any) => idNum.fromJSON(e)) : [], pay: globalThis.Array.isArray(object?.pay) ? object.pay.map((e: any) => idNum.fromJSON(e)) : [], }; }, toJSON(message: payCurrency): unknown { const obj: any = {}; if (message.now?.length) { obj.now = message.now.map((e) => idNum.toJSON(e)); } if (message.pay?.length) { obj.pay = message.pay.map((e) => idNum.toJSON(e)); } return obj; }, create, I>>(base?: I): payCurrency { return payCurrency.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): payCurrency { const message = createBasepayCurrency(); message.now = object.now?.map((e) => idNum.fromPartial(e)) || []; message.pay = object.pay?.map((e) => idNum.fromPartial(e)) || []; return message; }, }; function createBasepayDebrisNty(): payDebrisNty { return { list: [] }; } export const payDebrisNty = { fromJSON(object: any): payDebrisNty { return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => idNum.fromJSON(e)) : [] }; }, toJSON(message: payDebrisNty): unknown { const obj: any = {}; if (message.list?.length) { obj.list = message.list.map((e) => idNum.toJSON(e)); } return obj; }, create, I>>(base?: I): payDebrisNty { return payDebrisNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): payDebrisNty { const message = createBasepayDebrisNty(); message.list = object.list?.map((e) => idNum.fromPartial(e)) || []; return message; }, }; function createBaseexceptionNty(): exceptionNty { return { errno: 0 }; } export const exceptionNty = { fromJSON(object: any): exceptionNty { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: exceptionNty): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): exceptionNty { return exceptionNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): exceptionNty { const message = createBaseexceptionNty(); message.errno = object.errno ?? 0; return message; }, }; function createBasecreateOrderNty(): createOrderNty { return { id: "", cfid: 0 }; } export const createOrderNty = { fromJSON(object: any): createOrderNty { return { id: isSet(object.id) ? globalThis.String(object.id) : "", cfid: isSet(object.cfid) ? globalThis.Number(object.cfid) : 0, }; }, toJSON(message: createOrderNty): unknown { const obj: any = {}; if (message.id !== "") { obj.id = message.id; } if (message.cfid !== 0) { obj.cfid = Math.round(message.cfid); } return obj; }, create, I>>(base?: I): createOrderNty { return createOrderNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): createOrderNty { const message = createBasecreateOrderNty(); message.id = object.id ?? ""; message.cfid = object.cfid ?? 0; return message; }, }; function createBasecityData(): cityData { return {}; } export const cityData = { fromJSON(_: any): cityData { return {}; }, toJSON(_: cityData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): cityData { return cityData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): cityData { const message = createBasecityData(); return message; }, }; function createBasecityDataRsp(): cityDataRsp { return { errno: 0, time: 0, list: [], skillList: [], skillid: 0 }; } export const cityDataRsp = { fromJSON(object: any): cityDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, time: isSet(object.time) ? globalThis.Number(object.time) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => building.fromJSON(e)) : [], skillList: globalThis.Array.isArray(object?.skillList) ? object.skillList.map((e: any) => globalThis.Number(e)) : [], skillid: isSet(object.skillid) ? globalThis.Number(object.skillid) : 0, }; }, toJSON(message: cityDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.time !== 0) { obj.time = Math.round(message.time); } if (message.list?.length) { obj.list = message.list.map((e) => building.toJSON(e)); } if (message.skillList?.length) { obj.skillList = message.skillList.map((e) => Math.round(e)); } if (message.skillid !== 0) { obj.skillid = Math.round(message.skillid); } return obj; }, create, I>>(base?: I): cityDataRsp { return cityDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): cityDataRsp { const message = createBasecityDataRsp(); message.errno = object.errno ?? 0; message.time = object.time ?? 0; message.list = object.list?.map((e) => building.fromPartial(e)) || []; message.skillList = object.skillList?.map((e) => e) || []; message.skillid = object.skillid ?? 0; return message; }, }; function createBasecityDataSend(): cityDataSend { return { time: 0, list: [] }; } export const cityDataSend = { fromJSON(object: any): cityDataSend { return { time: isSet(object.time) ? globalThis.Number(object.time) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => building.fromJSON(e)) : [], }; }, toJSON(message: cityDataSend): unknown { const obj: any = {}; if (message.time !== 0) { obj.time = Math.round(message.time); } if (message.list?.length) { obj.list = message.list.map((e) => building.toJSON(e)); } return obj; }, create, I>>(base?: I): cityDataSend { return cityDataSend.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): cityDataSend { const message = createBasecityDataSend(); message.time = object.time ?? 0; message.list = object.list?.map((e) => building.fromPartial(e)) || []; return message; }, }; function createBasebuildingUpgrade(): buildingUpgrade { return { id: 0 }; } export const buildingUpgrade = { fromJSON(object: any): buildingUpgrade { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 }; }, toJSON(message: buildingUpgrade): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): buildingUpgrade { return buildingUpgrade.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): buildingUpgrade { const message = createBasebuildingUpgrade(); message.id = object.id ?? 0; return message; }, }; function createBasebuildingUpgradeRsp(): buildingUpgradeRsp { return { errno: 0, data: undefined }; } export const buildingUpgradeRsp = { fromJSON(object: any): buildingUpgradeRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? building.fromJSON(object.data) : undefined, }; }, toJSON(message: buildingUpgradeRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = building.toJSON(message.data); } return obj; }, create, I>>(base?: I): buildingUpgradeRsp { return buildingUpgradeRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): buildingUpgradeRsp { const message = createBasebuildingUpgradeRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? building.fromPartial(object.data) : undefined; return message; }, }; function createBasebuildingOneKey(): buildingOneKey { return {}; } export const buildingOneKey = { fromJSON(_: any): buildingOneKey { return {}; }, toJSON(_: buildingOneKey): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): buildingOneKey { return buildingOneKey.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): buildingOneKey { const message = createBasebuildingOneKey(); return message; }, }; function createBasebuildingOneKeyRsp(): buildingOneKeyRsp { return { errno: 0, list: [] }; } export const buildingOneKeyRsp = { fromJSON(object: any): buildingOneKeyRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => building.fromJSON(e)) : [], }; }, toJSON(message: buildingOneKeyRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => building.toJSON(e)); } return obj; }, create, I>>(base?: I): buildingOneKeyRsp { return buildingOneKeyRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): buildingOneKeyRsp { const message = createBasebuildingOneKeyRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => building.fromPartial(e)) || []; return message; }, }; function createBaseadventureData(): adventureData { return {}; } export const adventureData = { fromJSON(_: any): adventureData { return {}; }, toJSON(_: adventureData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): adventureData { return adventureData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): adventureData { const message = createBaseadventureData(); return message; }, }; function createBaseadventureDataRsp(): adventureDataRsp { return { errno: 0, id1: 0, award1: [], id2: 0, award2: [], type: 0, layer: 0, cost: 0 }; } export const adventureDataRsp = { fromJSON(object: any): adventureDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, id1: isSet(object.id1) ? globalThis.Number(object.id1) : 0, award1: globalThis.Array.isArray(object?.award1) ? object.award1.map((e: any) => globalThis.Number(e)) : [], id2: isSet(object.id2) ? globalThis.Number(object.id2) : 0, award2: globalThis.Array.isArray(object?.award2) ? object.award2.map((e: any) => globalThis.Number(e)) : [], type: isSet(object.type) ? globalThis.Number(object.type) : 0, layer: isSet(object.layer) ? globalThis.Number(object.layer) : 0, cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0, }; }, toJSON(message: adventureDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.id1 !== 0) { obj.id1 = Math.round(message.id1); } if (message.award1?.length) { obj.award1 = message.award1.map((e) => Math.round(e)); } if (message.id2 !== 0) { obj.id2 = Math.round(message.id2); } if (message.award2?.length) { obj.award2 = message.award2.map((e) => Math.round(e)); } if (message.type !== 0) { obj.type = Math.round(message.type); } if (message.layer !== 0) { obj.layer = Math.round(message.layer); } if (message.cost !== 0) { obj.cost = Math.round(message.cost); } return obj; }, create, I>>(base?: I): adventureDataRsp { return adventureDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): adventureDataRsp { const message = createBaseadventureDataRsp(); message.errno = object.errno ?? 0; message.id1 = object.id1 ?? 0; message.award1 = object.award1?.map((e) => e) || []; message.id2 = object.id2 ?? 0; message.award2 = object.award2?.map((e) => e) || []; message.type = object.type ?? 0; message.layer = object.layer ?? 0; message.cost = object.cost ?? 0; return message; }, }; function createBaseadventureStart(): adventureStart { return { id: 0, type: 0 }; } export const adventureStart = { fromJSON(object: any): adventureStart { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0, type: isSet(object.type) ? globalThis.Number(object.type) : 0, }; }, toJSON(message: adventureStart): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } if (message.type !== 0) { obj.type = Math.round(message.type); } return obj; }, create, I>>(base?: I): adventureStart { return adventureStart.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): adventureStart { const message = createBaseadventureStart(); message.id = object.id ?? 0; message.type = object.type ?? 0; return message; }, }; function createBaseadventureStartRsp(): adventureStartRsp { return { errno: 0, btrial: false, trialId: 0, trialNum: 0 }; } export const adventureStartRsp = { fromJSON(object: any): adventureStartRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, btrial: isSet(object.btrial) ? globalThis.Boolean(object.btrial) : false, trialId: isSet(object.trialId) ? globalThis.Number(object.trialId) : 0, trialNum: isSet(object.trialNum) ? globalThis.Number(object.trialNum) : 0, }; }, toJSON(message: adventureStartRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.btrial !== false) { obj.btrial = message.btrial; } if (message.trialId !== 0) { obj.trialId = Math.round(message.trialId); } if (message.trialNum !== 0) { obj.trialNum = Math.round(message.trialNum); } return obj; }, create, I>>(base?: I): adventureStartRsp { return adventureStartRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): adventureStartRsp { const message = createBaseadventureStartRsp(); message.errno = object.errno ?? 0; message.btrial = object.btrial ?? false; message.trialId = object.trialId ?? 0; message.trialNum = object.trialNum ?? 0; return message; }, }; function createBaseadventureEnd(): adventureEnd { return { win: false, monsterNum: 0, bossNum: 0, eliteNum: 0 }; } export const adventureEnd = { fromJSON(object: any): adventureEnd { return { win: isSet(object.win) ? globalThis.Boolean(object.win) : false, monsterNum: isSet(object.monsterNum) ? globalThis.Number(object.monsterNum) : 0, bossNum: isSet(object.bossNum) ? globalThis.Number(object.bossNum) : 0, eliteNum: isSet(object.eliteNum) ? globalThis.Number(object.eliteNum) : 0, }; }, toJSON(message: adventureEnd): unknown { const obj: any = {}; if (message.win !== false) { obj.win = message.win; } if (message.monsterNum !== 0) { obj.monsterNum = Math.round(message.monsterNum); } if (message.bossNum !== 0) { obj.bossNum = Math.round(message.bossNum); } if (message.eliteNum !== 0) { obj.eliteNum = Math.round(message.eliteNum); } return obj; }, create, I>>(base?: I): adventureEnd { return adventureEnd.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): adventureEnd { const message = createBaseadventureEnd(); message.win = object.win ?? false; message.monsterNum = object.monsterNum ?? 0; message.bossNum = object.bossNum ?? 0; message.eliteNum = object.eliteNum ?? 0; return message; }, }; function createBaseadventureEndRsp(): adventureEndRsp { return { errno: 0 }; } export const adventureEndRsp = { fromJSON(object: any): adventureEndRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: adventureEndRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): adventureEndRsp { return adventureEndRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): adventureEndRsp { const message = createBaseadventureEndRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaseadventureLayer(): adventureLayer { return { layer: 0, cost: 0, monsterNum: 0, bossNum: 0, eliteNum: 0 }; } export const adventureLayer = { fromJSON(object: any): adventureLayer { return { layer: isSet(object.layer) ? globalThis.Number(object.layer) : 0, cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0, monsterNum: isSet(object.monsterNum) ? globalThis.Number(object.monsterNum) : 0, bossNum: isSet(object.bossNum) ? globalThis.Number(object.bossNum) : 0, eliteNum: isSet(object.eliteNum) ? globalThis.Number(object.eliteNum) : 0, }; }, toJSON(message: adventureLayer): unknown { const obj: any = {}; if (message.layer !== 0) { obj.layer = Math.round(message.layer); } if (message.cost !== 0) { obj.cost = Math.round(message.cost); } if (message.monsterNum !== 0) { obj.monsterNum = Math.round(message.monsterNum); } if (message.bossNum !== 0) { obj.bossNum = Math.round(message.bossNum); } if (message.eliteNum !== 0) { obj.eliteNum = Math.round(message.eliteNum); } return obj; }, create, I>>(base?: I): adventureLayer { return adventureLayer.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): adventureLayer { const message = createBaseadventureLayer(); message.layer = object.layer ?? 0; message.cost = object.cost ?? 0; message.monsterNum = object.monsterNum ?? 0; message.bossNum = object.bossNum ?? 0; message.eliteNum = object.eliteNum ?? 0; return message; }, }; function createBaseadventureLayerRsp(): adventureLayerRsp { return { errno: 0 }; } export const adventureLayerRsp = { fromJSON(object: any): adventureLayerRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: adventureLayerRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): adventureLayerRsp { return adventureLayerRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): adventureLayerRsp { const message = createBaseadventureLayerRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaseadventureSweep(): adventureSweep { return { id: 0, type: 0 }; } export const adventureSweep = { fromJSON(object: any): adventureSweep { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0, type: isSet(object.type) ? globalThis.Number(object.type) : 0, }; }, toJSON(message: adventureSweep): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } if (message.type !== 0) { obj.type = Math.round(message.type); } return obj; }, create, I>>(base?: I): adventureSweep { return adventureSweep.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): adventureSweep { const message = createBaseadventureSweep(); message.id = object.id ?? 0; message.type = object.type ?? 0; return message; }, }; function createBaseadventureSweepRsp(): adventureSweepRsp { return { errno: 0 }; } export const adventureSweepRsp = { fromJSON(object: any): adventureSweepRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: adventureSweepRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): adventureSweepRsp { return adventureSweepRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): adventureSweepRsp { const message = createBaseadventureSweepRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaseadventurePassAward(): adventurePassAward { return { id: 0, type: 0 }; } export const adventurePassAward = { fromJSON(object: any): adventurePassAward { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0, type: isSet(object.type) ? globalThis.Number(object.type) : 0, }; }, toJSON(message: adventurePassAward): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } if (message.type !== 0) { obj.type = Math.round(message.type); } return obj; }, create, I>>(base?: I): adventurePassAward { return adventurePassAward.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): adventurePassAward { const message = createBaseadventurePassAward(); message.id = object.id ?? 0; message.type = object.type ?? 0; return message; }, }; function createBaseadventurePassAwardRsp(): adventurePassAwardRsp { return { errno: 0, id: 0, type: 0 }; } export const adventurePassAwardRsp = { fromJSON(object: any): adventurePassAwardRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, id: isSet(object.id) ? globalThis.Number(object.id) : 0, type: isSet(object.type) ? globalThis.Number(object.type) : 0, }; }, toJSON(message: adventurePassAwardRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.id !== 0) { obj.id = Math.round(message.id); } if (message.type !== 0) { obj.type = Math.round(message.type); } return obj; }, create, I>>(base?: I): adventurePassAwardRsp { return adventurePassAwardRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): adventurePassAwardRsp { const message = createBaseadventurePassAwardRsp(); message.errno = object.errno ?? 0; message.id = object.id ?? 0; message.type = object.type ?? 0; return message; }, }; function createBaseadventureAdAward(): adventureAdAward { return {}; } export const adventureAdAward = { fromJSON(_: any): adventureAdAward { return {}; }, toJSON(_: adventureAdAward): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): adventureAdAward { return adventureAdAward.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): adventureAdAward { const message = createBaseadventureAdAward(); return message; }, }; function createBaseadventureAdAwardRsp(): adventureAdAwardRsp { return { errno: 0 }; } export const adventureAdAwardRsp = { fromJSON(object: any): adventureAdAwardRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: adventureAdAwardRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): adventureAdAwardRsp { return adventureAdAwardRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): adventureAdAwardRsp { const message = createBaseadventureAdAwardRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaseadventureTrial(): adventureTrial { return {}; } export const adventureTrial = { fromJSON(_: any): adventureTrial { return {}; }, toJSON(_: adventureTrial): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): adventureTrial { return adventureTrial.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): adventureTrial { const message = createBaseadventureTrial(); return message; }, }; function createBaseadventureTrialRsp(): adventureTrialRsp { return { errno: 0 }; } export const adventureTrialRsp = { fromJSON(object: any): adventureTrialRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: adventureTrialRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): adventureTrialRsp { return adventureTrialRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): adventureTrialRsp { const message = createBaseadventureTrialRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBasegetMail(): getMail { return {}; } export const getMail = { fromJSON(_: any): getMail { return {}; }, toJSON(_: getMail): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): getMail { return getMail.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): getMail { const message = createBasegetMail(); return message; }, }; function createBasegetMailRsp(): getMailRsp { return { errno: 0, list: [] }; } export const getMailRsp = { fromJSON(object: any): getMailRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => mail.fromJSON(e)) : [], }; }, toJSON(message: getMailRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => mail.toJSON(e)); } return obj; }, create, I>>(base?: I): getMailRsp { return getMailRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): getMailRsp { const message = createBasegetMailRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => mail.fromPartial(e)) || []; return message; }, }; function createBasegetMailGoods(): getMailGoods { return { list: [], bonekey: false }; } export const getMailGoods = { fromJSON(object: any): getMailGoods { return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [], bonekey: isSet(object.bonekey) ? globalThis.Boolean(object.bonekey) : false, }; }, toJSON(message: getMailGoods): unknown { const obj: any = {}; if (message.list?.length) { obj.list = message.list; } if (message.bonekey !== false) { obj.bonekey = message.bonekey; } return obj; }, create, I>>(base?: I): getMailGoods { return getMailGoods.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): getMailGoods { const message = createBasegetMailGoods(); message.list = object.list?.map((e) => e) || []; message.bonekey = object.bonekey ?? false; return message; }, }; function createBasegetMailGoodsRsp(): getMailGoodsRsp { return { errno: 0, list: [] }; } export const getMailGoodsRsp = { fromJSON(object: any): getMailGoodsRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [], }; }, toJSON(message: getMailGoodsRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list; } return obj; }, create, I>>(base?: I): getMailGoodsRsp { return getMailGoodsRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): getMailGoodsRsp { const message = createBasegetMailGoodsRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => e) || []; return message; }, }; function createBasedelMail(): delMail { return { list: [] }; } export const delMail = { fromJSON(object: any): delMail { return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [] }; }, toJSON(message: delMail): unknown { const obj: any = {}; if (message.list?.length) { obj.list = message.list; } return obj; }, create, I>>(base?: I): delMail { return delMail.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): delMail { const message = createBasedelMail(); message.list = object.list?.map((e) => e) || []; return message; }, }; function createBasedelMailRsp(): delMailRsp { return { errno: 0, list: [] }; } export const delMailRsp = { fromJSON(object: any): delMailRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [], }; }, toJSON(message: delMailRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list; } return obj; }, create, I>>(base?: I): delMailRsp { return delMailRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): delMailRsp { const message = createBasedelMailRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => e) || []; return message; }, }; function createBaseflagMail(): flagMail { return { list: [] }; } export const flagMail = { fromJSON(object: any): flagMail { return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [] }; }, toJSON(message: flagMail): unknown { const obj: any = {}; if (message.list?.length) { obj.list = message.list; } return obj; }, create, I>>(base?: I): flagMail { return flagMail.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): flagMail { const message = createBaseflagMail(); message.list = object.list?.map((e) => e) || []; return message; }, }; function createBaseflagMailRsp(): flagMailRsp { return { errno: 0 }; } export const flagMailRsp = { fromJSON(object: any): flagMailRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: flagMailRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): flagMailRsp { return flagMailRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): flagMailRsp { const message = createBaseflagMailRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBasesendMail(): sendMail { return { list: [] }; } export const sendMail = { fromJSON(object: any): sendMail { return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => mail.fromJSON(e)) : [] }; }, toJSON(message: sendMail): unknown { const obj: any = {}; if (message.list?.length) { obj.list = message.list.map((e) => mail.toJSON(e)); } return obj; }, create, I>>(base?: I): sendMail { return sendMail.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): sendMail { const message = createBasesendMail(); message.list = object.list?.map((e) => mail.fromPartial(e)) || []; return message; }, }; function createBasesimpleMail(): simpleMail { return { num: 0, noread: 0, needread: 0 }; } export const simpleMail = { fromJSON(object: any): simpleMail { return { num: isSet(object.num) ? globalThis.Number(object.num) : 0, noread: isSet(object.noread) ? globalThis.Number(object.noread) : 0, needread: isSet(object.needread) ? globalThis.Number(object.needread) : 0, }; }, toJSON(message: simpleMail): unknown { const obj: any = {}; if (message.num !== 0) { obj.num = Math.round(message.num); } if (message.noread !== 0) { obj.noread = Math.round(message.noread); } if (message.needread !== 0) { obj.needread = Math.round(message.needread); } return obj; }, create, I>>(base?: I): simpleMail { return simpleMail.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): simpleMail { const message = createBasesimpleMail(); message.num = object.num ?? 0; message.noread = object.noread ?? 0; message.needread = object.needread ?? 0; return message; }, }; function createBaseembattleGetData(): embattleGetData { return {}; } export const embattleGetData = { fromJSON(_: any): embattleGetData { return {}; }, toJSON(_: embattleGetData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): embattleGetData { return embattleGetData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): embattleGetData { const message = createBaseembattleGetData(); return message; }, }; function createBaseembattleGetDataRsp(): embattleGetDataRsp { return { errno: 0, list: [], cardList: [] }; } export const embattleGetDataRsp = { fromJSON(object: any): embattleGetDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => sidPos.fromJSON(e)) : [], cardList: globalThis.Array.isArray(object?.cardList) ? object.cardList.map((e: any) => sidPos.fromJSON(e)) : [], }; }, toJSON(message: embattleGetDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => sidPos.toJSON(e)); } if (message.cardList?.length) { obj.cardList = message.cardList.map((e) => sidPos.toJSON(e)); } return obj; }, create, I>>(base?: I): embattleGetDataRsp { return embattleGetDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): embattleGetDataRsp { const message = createBaseembattleGetDataRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => sidPos.fromPartial(e)) || []; message.cardList = object.cardList?.map((e) => sidPos.fromPartial(e)) || []; return message; }, }; function createBaseembattleBattle(): embattleBattle { return { skill: false, sid: "", pos: 0 }; } export const embattleBattle = { fromJSON(object: any): embattleBattle { return { skill: isSet(object.skill) ? globalThis.Boolean(object.skill) : false, sid: isSet(object.sid) ? globalThis.String(object.sid) : "", pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0, }; }, toJSON(message: embattleBattle): unknown { const obj: any = {}; if (message.skill !== false) { obj.skill = message.skill; } if (message.sid !== "") { obj.sid = message.sid; } if (message.pos !== 0) { obj.pos = Math.round(message.pos); } return obj; }, create, I>>(base?: I): embattleBattle { return embattleBattle.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): embattleBattle { const message = createBaseembattleBattle(); message.skill = object.skill ?? false; message.sid = object.sid ?? ""; message.pos = object.pos ?? 0; return message; }, }; function createBaseembattleBattleRsp(): embattleBattleRsp { return { errno: 0, list: [], cardList: [] }; } export const embattleBattleRsp = { fromJSON(object: any): embattleBattleRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => sidPos.fromJSON(e)) : [], cardList: globalThis.Array.isArray(object?.cardList) ? object.cardList.map((e: any) => sidPos.fromJSON(e)) : [], }; }, toJSON(message: embattleBattleRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => sidPos.toJSON(e)); } if (message.cardList?.length) { obj.cardList = message.cardList.map((e) => sidPos.toJSON(e)); } return obj; }, create, I>>(base?: I): embattleBattleRsp { return embattleBattleRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): embattleBattleRsp { const message = createBaseembattleBattleRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => sidPos.fromPartial(e)) || []; message.cardList = object.cardList?.map((e) => sidPos.fromPartial(e)) || []; return message; }, }; function createBaseheroGetData(): heroGetData { return {}; } export const heroGetData = { fromJSON(_: any): heroGetData { return {}; }, toJSON(_: heroGetData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): heroGetData { return heroGetData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): heroGetData { const message = createBaseheroGetData(); return message; }, }; function createBaseheroGetDataRsp(): heroGetDataRsp { return { errno: 0, list: [] }; } export const heroGetDataRsp = { fromJSON(object: any): heroGetDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => hero.fromJSON(e)) : [], }; }, toJSON(message: heroGetDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => hero.toJSON(e)); } return obj; }, create, I>>(base?: I): heroGetDataRsp { return heroGetDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): heroGetDataRsp { const message = createBaseheroGetDataRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => hero.fromPartial(e)) || []; return message; }, }; function createBaseheroUpgrade(): heroUpgrade { return { sid: "", num: 0 }; } export const heroUpgrade = { fromJSON(object: any): heroUpgrade { return { sid: isSet(object.sid) ? globalThis.String(object.sid) : "", num: isSet(object.num) ? globalThis.Number(object.num) : 0, }; }, toJSON(message: heroUpgrade): unknown { const obj: any = {}; if (message.sid !== "") { obj.sid = message.sid; } if (message.num !== 0) { obj.num = Math.round(message.num); } return obj; }, create, I>>(base?: I): heroUpgrade { return heroUpgrade.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): heroUpgrade { const message = createBaseheroUpgrade(); message.sid = object.sid ?? ""; message.num = object.num ?? 0; return message; }, }; function createBaseheroUpgradeRsp(): heroUpgradeRsp { return { errno: 0, data: undefined }; } export const heroUpgradeRsp = { fromJSON(object: any): heroUpgradeRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? hero.fromJSON(object.data) : undefined, }; }, toJSON(message: heroUpgradeRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = hero.toJSON(message.data); } return obj; }, create, I>>(base?: I): heroUpgradeRsp { return heroUpgradeRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): heroUpgradeRsp { const message = createBaseheroUpgradeRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? hero.fromPartial(object.data) : undefined; return message; }, }; function createBaseheroUpgradeStar(): heroUpgradeStar { return { sid: "", same: [], other: [], currency: undefined }; } export const heroUpgradeStar = { fromJSON(object: any): heroUpgradeStar { return { sid: isSet(object.sid) ? globalThis.String(object.sid) : "", same: globalThis.Array.isArray(object?.same) ? object.same.map((e: any) => globalThis.String(e)) : [], other: globalThis.Array.isArray(object?.other) ? object.other.map((e: any) => globalThis.String(e)) : [], currency: isSet(object.currency) ? idNum.fromJSON(object.currency) : undefined, }; }, toJSON(message: heroUpgradeStar): unknown { const obj: any = {}; if (message.sid !== "") { obj.sid = message.sid; } if (message.same?.length) { obj.same = message.same; } if (message.other?.length) { obj.other = message.other; } if (message.currency !== undefined) { obj.currency = idNum.toJSON(message.currency); } return obj; }, create, I>>(base?: I): heroUpgradeStar { return heroUpgradeStar.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): heroUpgradeStar { const message = createBaseheroUpgradeStar(); message.sid = object.sid ?? ""; message.same = object.same?.map((e) => e) || []; message.other = object.other?.map((e) => e) || []; message.currency = (object.currency !== undefined && object.currency !== null) ? idNum.fromPartial(object.currency) : undefined; return message; }, }; function createBaseheroUpgradeStarRsp(): heroUpgradeStarRsp { return { errno: 0, data: undefined, same: [], other: [], currency: undefined }; } export const heroUpgradeStarRsp = { fromJSON(object: any): heroUpgradeStarRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? hero.fromJSON(object.data) : undefined, same: globalThis.Array.isArray(object?.same) ? object.same.map((e: any) => globalThis.String(e)) : [], other: globalThis.Array.isArray(object?.other) ? object.other.map((e: any) => globalThis.String(e)) : [], currency: isSet(object.currency) ? idNum.fromJSON(object.currency) : undefined, }; }, toJSON(message: heroUpgradeStarRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = hero.toJSON(message.data); } if (message.same?.length) { obj.same = message.same; } if (message.other?.length) { obj.other = message.other; } if (message.currency !== undefined) { obj.currency = idNum.toJSON(message.currency); } return obj; }, create, I>>(base?: I): heroUpgradeStarRsp { return heroUpgradeStarRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): heroUpgradeStarRsp { const message = createBaseheroUpgradeStarRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? hero.fromPartial(object.data) : undefined; message.same = object.same?.map((e) => e) || []; message.other = object.other?.map((e) => e) || []; message.currency = (object.currency !== undefined && object.currency !== null) ? idNum.fromPartial(object.currency) : undefined; return message; }, }; function createBaseheroOnekeyUpgradeStar(): heroOnekeyUpgradeStar { return {}; } export const heroOnekeyUpgradeStar = { fromJSON(_: any): heroOnekeyUpgradeStar { return {}; }, toJSON(_: heroOnekeyUpgradeStar): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): heroOnekeyUpgradeStar { return heroOnekeyUpgradeStar.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): heroOnekeyUpgradeStar { const message = createBaseheroOnekeyUpgradeStar(); return message; }, }; function createBaseheroOnekeyUpgradeStarRsp(): heroOnekeyUpgradeStarRsp { return { errno: 0, delList: [], changeList: [] }; } export const heroOnekeyUpgradeStarRsp = { fromJSON(object: any): heroOnekeyUpgradeStarRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, delList: globalThis.Array.isArray(object?.delList) ? object.delList.map((e: any) => globalThis.String(e)) : [], changeList: globalThis.Array.isArray(object?.changeList) ? object.changeList.map((e: any) => hero.fromJSON(e)) : [], }; }, toJSON(message: heroOnekeyUpgradeStarRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.delList?.length) { obj.delList = message.delList; } if (message.changeList?.length) { obj.changeList = message.changeList.map((e) => hero.toJSON(e)); } return obj; }, create, I>>(base?: I): heroOnekeyUpgradeStarRsp { return heroOnekeyUpgradeStarRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): heroOnekeyUpgradeStarRsp { const message = createBaseheroOnekeyUpgradeStarRsp(); message.errno = object.errno ?? 0; message.delList = object.delList?.map((e) => e) || []; message.changeList = object.changeList?.map((e) => hero.fromPartial(e)) || []; return message; }, }; function createBaseheroReset(): heroReset { return { level: false, sid: "" }; } export const heroReset = { fromJSON(object: any): heroReset { return { level: isSet(object.level) ? globalThis.Boolean(object.level) : false, sid: isSet(object.sid) ? globalThis.String(object.sid) : "", }; }, toJSON(message: heroReset): unknown { const obj: any = {}; if (message.level !== false) { obj.level = message.level; } if (message.sid !== "") { obj.sid = message.sid; } return obj; }, create, I>>(base?: I): heroReset { return heroReset.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): heroReset { const message = createBaseheroReset(); message.level = object.level ?? false; message.sid = object.sid ?? ""; return message; }, }; function createBaseheroResetRsp(): heroResetRsp { return { errno: 0, data: undefined }; } export const heroResetRsp = { fromJSON(object: any): heroResetRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? hero.fromJSON(object.data) : undefined, }; }, toJSON(message: heroResetRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = hero.toJSON(message.data); } return obj; }, create, I>>(base?: I): heroResetRsp { return heroResetRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): heroResetRsp { const message = createBaseheroResetRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? hero.fromPartial(object.data) : undefined; return message; }, }; function createBaseheroWearEquip(): heroWearEquip { return { sid: "", list: [] }; } export const heroWearEquip = { fromJSON(object: any): heroWearEquip { return { sid: isSet(object.sid) ? globalThis.String(object.sid) : "", list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [], }; }, toJSON(message: heroWearEquip): unknown { const obj: any = {}; if (message.sid !== "") { obj.sid = message.sid; } if (message.list?.length) { obj.list = message.list; } return obj; }, create, I>>(base?: I): heroWearEquip { return heroWearEquip.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): heroWearEquip { const message = createBaseheroWearEquip(); message.sid = object.sid ?? ""; message.list = object.list?.map((e) => e) || []; return message; }, }; function createBaseheroWearEquipRsp(): heroWearEquipRsp { return { errno: 0, list: [], data: undefined }; } export const heroWearEquipRsp = { fromJSON(object: any): heroWearEquipRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [], data: isSet(object.data) ? hero.fromJSON(object.data) : undefined, }; }, toJSON(message: heroWearEquipRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list; } if (message.data !== undefined) { obj.data = hero.toJSON(message.data); } return obj; }, create, I>>(base?: I): heroWearEquipRsp { return heroWearEquipRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): heroWearEquipRsp { const message = createBaseheroWearEquipRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => e) || []; message.data = (object.data !== undefined && object.data !== null) ? hero.fromPartial(object.data) : undefined; return message; }, }; function createBaseheroChangeNty(): heroChangeNty { return { list: [] }; } export const heroChangeNty = { fromJSON(object: any): heroChangeNty { return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => hero.fromJSON(e)) : [] }; }, toJSON(message: heroChangeNty): unknown { const obj: any = {}; if (message.list?.length) { obj.list = message.list.map((e) => hero.toJSON(e)); } return obj; }, create, I>>(base?: I): heroChangeNty { return heroChangeNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): heroChangeNty { const message = createBaseheroChangeNty(); message.list = object.list?.map((e) => hero.fromPartial(e)) || []; return message; }, }; function createBaseskillCardGetData(): skillCardGetData { return {}; } export const skillCardGetData = { fromJSON(_: any): skillCardGetData { return {}; }, toJSON(_: skillCardGetData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): skillCardGetData { return skillCardGetData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): skillCardGetData { const message = createBaseskillCardGetData(); return message; }, }; function createBaseskillCardGetDataRsp(): skillCardGetDataRsp { return { errno: 0, list: [] }; } export const skillCardGetDataRsp = { fromJSON(object: any): skillCardGetDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => card.fromJSON(e)) : [], }; }, toJSON(message: skillCardGetDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => card.toJSON(e)); } return obj; }, create, I>>(base?: I): skillCardGetDataRsp { return skillCardGetDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): skillCardGetDataRsp { const message = createBaseskillCardGetDataRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => card.fromPartial(e)) || []; return message; }, }; function createBaseskillCardUpgrade(): skillCardUpgrade { return { sid: "", num: 0 }; } export const skillCardUpgrade = { fromJSON(object: any): skillCardUpgrade { return { sid: isSet(object.sid) ? globalThis.String(object.sid) : "", num: isSet(object.num) ? globalThis.Number(object.num) : 0, }; }, toJSON(message: skillCardUpgrade): unknown { const obj: any = {}; if (message.sid !== "") { obj.sid = message.sid; } if (message.num !== 0) { obj.num = Math.round(message.num); } return obj; }, create, I>>(base?: I): skillCardUpgrade { return skillCardUpgrade.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): skillCardUpgrade { const message = createBaseskillCardUpgrade(); message.sid = object.sid ?? ""; message.num = object.num ?? 0; return message; }, }; function createBaseskillCardUpgradeRsp(): skillCardUpgradeRsp { return { errno: 0, data: undefined }; } export const skillCardUpgradeRsp = { fromJSON(object: any): skillCardUpgradeRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? card.fromJSON(object.data) : undefined, }; }, toJSON(message: skillCardUpgradeRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = card.toJSON(message.data); } return obj; }, create, I>>(base?: I): skillCardUpgradeRsp { return skillCardUpgradeRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): skillCardUpgradeRsp { const message = createBaseskillCardUpgradeRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? card.fromPartial(object.data) : undefined; return message; }, }; function createBaseskillCardUpgradeStar(): skillCardUpgradeStar { return { sid: "" }; } export const skillCardUpgradeStar = { fromJSON(object: any): skillCardUpgradeStar { return { sid: isSet(object.sid) ? globalThis.String(object.sid) : "" }; }, toJSON(message: skillCardUpgradeStar): unknown { const obj: any = {}; if (message.sid !== "") { obj.sid = message.sid; } return obj; }, create, I>>(base?: I): skillCardUpgradeStar { return skillCardUpgradeStar.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): skillCardUpgradeStar { const message = createBaseskillCardUpgradeStar(); message.sid = object.sid ?? ""; return message; }, }; function createBaseskillCardUpgradeStarRsp(): skillCardUpgradeStarRsp { return { errno: 0, data: undefined }; } export const skillCardUpgradeStarRsp = { fromJSON(object: any): skillCardUpgradeStarRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? card.fromJSON(object.data) : undefined, }; }, toJSON(message: skillCardUpgradeStarRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = card.toJSON(message.data); } return obj; }, create, I>>(base?: I): skillCardUpgradeStarRsp { return skillCardUpgradeStarRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): skillCardUpgradeStarRsp { const message = createBaseskillCardUpgradeStarRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? card.fromPartial(object.data) : undefined; return message; }, }; function createBaseroleGetData(): roleGetData { return {}; } export const roleGetData = { fromJSON(_: any): roleGetData { return {}; }, toJSON(_: roleGetData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): roleGetData { return roleGetData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): roleGetData { const message = createBaseroleGetData(); return message; }, }; function createBaseroleGetDataRsp(): roleGetDataRsp { return { errno: 0, level: 0, exp: 0 }; } export const roleGetDataRsp = { fromJSON(object: any): roleGetDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, level: isSet(object.level) ? globalThis.Number(object.level) : 0, exp: isSet(object.exp) ? globalThis.Number(object.exp) : 0, }; }, toJSON(message: roleGetDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.level !== 0) { obj.level = Math.round(message.level); } if (message.exp !== 0) { obj.exp = Math.round(message.exp); } return obj; }, create, I>>(base?: I): roleGetDataRsp { return roleGetDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): roleGetDataRsp { const message = createBaseroleGetDataRsp(); message.errno = object.errno ?? 0; message.level = object.level ?? 0; message.exp = object.exp ?? 0; return message; }, }; function createBaseroleUpgrade(): roleUpgrade { return {}; } export const roleUpgrade = { fromJSON(_: any): roleUpgrade { return {}; }, toJSON(_: roleUpgrade): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): roleUpgrade { return roleUpgrade.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): roleUpgrade { const message = createBaseroleUpgrade(); return message; }, }; function createBaseroleUpgradeRsp(): roleUpgradeRsp { return { errno: 0, level: 0, exp: 0 }; } export const roleUpgradeRsp = { fromJSON(object: any): roleUpgradeRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, level: isSet(object.level) ? globalThis.Number(object.level) : 0, exp: isSet(object.exp) ? globalThis.Number(object.exp) : 0, }; }, toJSON(message: roleUpgradeRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.level !== 0) { obj.level = Math.round(message.level); } if (message.exp !== 0) { obj.exp = Math.round(message.exp); } return obj; }, create, I>>(base?: I): roleUpgradeRsp { return roleUpgradeRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): roleUpgradeRsp { const message = createBaseroleUpgradeRsp(); message.errno = object.errno ?? 0; message.level = object.level ?? 0; message.exp = object.exp ?? 0; return message; }, }; function createBaseroleRename(): roleRename { return { name: "" }; } export const roleRename = { fromJSON(object: any): roleRename { return { name: isSet(object.name) ? globalThis.String(object.name) : "" }; }, toJSON(message: roleRename): unknown { const obj: any = {}; if (message.name !== "") { obj.name = message.name; } return obj; }, create, I>>(base?: I): roleRename { return roleRename.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): roleRename { const message = createBaseroleRename(); message.name = object.name ?? ""; return message; }, }; function createBaseroleRenameRsp(): roleRenameRsp { return { errno: 0, name: "", time: 0 }; } export const roleRenameRsp = { fromJSON(object: any): roleRenameRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, name: isSet(object.name) ? globalThis.String(object.name) : "", time: isSet(object.time) ? globalThis.Number(object.time) : 0, }; }, toJSON(message: roleRenameRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.name !== "") { obj.name = message.name; } if (message.time !== 0) { obj.time = Math.round(message.time); } return obj; }, create, I>>(base?: I): roleRenameRsp { return roleRenameRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): roleRenameRsp { const message = createBaseroleRenameRsp(); message.errno = object.errno ?? 0; message.name = object.name ?? ""; message.time = object.time ?? 0; return message; }, }; function createBasedebrisGetData(): debrisGetData { return {}; } export const debrisGetData = { fromJSON(_: any): debrisGetData { return {}; }, toJSON(_: debrisGetData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): debrisGetData { return debrisGetData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): debrisGetData { const message = createBasedebrisGetData(); return message; }, }; function createBasedebrisGetDataRsp(): debrisGetDataRsp { return { errno: 0, list: [] }; } export const debrisGetDataRsp = { fromJSON(object: any): debrisGetDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => idNum.fromJSON(e)) : [], }; }, toJSON(message: debrisGetDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => idNum.toJSON(e)); } return obj; }, create, I>>(base?: I): debrisGetDataRsp { return debrisGetDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): debrisGetDataRsp { const message = createBasedebrisGetDataRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => idNum.fromPartial(e)) || []; return message; }, }; function createBasedebrisMerge(): debrisMerge { return { id: 0 }; } export const debrisMerge = { fromJSON(object: any): debrisMerge { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 }; }, toJSON(message: debrisMerge): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): debrisMerge { return debrisMerge.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): debrisMerge { const message = createBasedebrisMerge(); message.id = object.id ?? 0; return message; }, }; function createBasedebrisMergeRsp(): debrisMergeRsp { return { errno: 0 }; } export const debrisMergeRsp = { fromJSON(object: any): debrisMergeRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: debrisMergeRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): debrisMergeRsp { return debrisMergeRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): debrisMergeRsp { const message = createBasedebrisMergeRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaseequipGetData(): equipGetData { return {}; } export const equipGetData = { fromJSON(_: any): equipGetData { return {}; }, toJSON(_: equipGetData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): equipGetData { return equipGetData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): equipGetData { const message = createBaseequipGetData(); return message; }, }; function createBaseequipGetDataRsp(): equipGetDataRsp { return { errno: 0, list: [] }; } export const equipGetDataRsp = { fromJSON(object: any): equipGetDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => equip.fromJSON(e)) : [], }; }, toJSON(message: equipGetDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => equip.toJSON(e)); } return obj; }, create, I>>(base?: I): equipGetDataRsp { return equipGetDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): equipGetDataRsp { const message = createBaseequipGetDataRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => equip.fromPartial(e)) || []; return message; }, }; function createBaseequipUpgrade(): equipUpgrade { return { sid: "", num: 0 }; } export const equipUpgrade = { fromJSON(object: any): equipUpgrade { return { sid: isSet(object.sid) ? globalThis.String(object.sid) : "", num: isSet(object.num) ? globalThis.Number(object.num) : 0, }; }, toJSON(message: equipUpgrade): unknown { const obj: any = {}; if (message.sid !== "") { obj.sid = message.sid; } if (message.num !== 0) { obj.num = Math.round(message.num); } return obj; }, create, I>>(base?: I): equipUpgrade { return equipUpgrade.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): equipUpgrade { const message = createBaseequipUpgrade(); message.sid = object.sid ?? ""; message.num = object.num ?? 0; return message; }, }; function createBaseequipUpgradeRsp(): equipUpgradeRsp { return { errno: 0, data: undefined }; } export const equipUpgradeRsp = { fromJSON(object: any): equipUpgradeRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? equip.fromJSON(object.data) : undefined, }; }, toJSON(message: equipUpgradeRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = equip.toJSON(message.data); } return obj; }, create, I>>(base?: I): equipUpgradeRsp { return equipUpgradeRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): equipUpgradeRsp { const message = createBaseequipUpgradeRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? equip.fromPartial(object.data) : undefined; return message; }, }; function createBaseequipUpgradeStar(): equipUpgradeStar { return { sid: "", same: [], other: [], currency: undefined }; } export const equipUpgradeStar = { fromJSON(object: any): equipUpgradeStar { return { sid: isSet(object.sid) ? globalThis.String(object.sid) : "", same: globalThis.Array.isArray(object?.same) ? object.same.map((e: any) => globalThis.String(e)) : [], other: globalThis.Array.isArray(object?.other) ? object.other.map((e: any) => globalThis.String(e)) : [], currency: isSet(object.currency) ? idNum.fromJSON(object.currency) : undefined, }; }, toJSON(message: equipUpgradeStar): unknown { const obj: any = {}; if (message.sid !== "") { obj.sid = message.sid; } if (message.same?.length) { obj.same = message.same; } if (message.other?.length) { obj.other = message.other; } if (message.currency !== undefined) { obj.currency = idNum.toJSON(message.currency); } return obj; }, create, I>>(base?: I): equipUpgradeStar { return equipUpgradeStar.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): equipUpgradeStar { const message = createBaseequipUpgradeStar(); message.sid = object.sid ?? ""; message.same = object.same?.map((e) => e) || []; message.other = object.other?.map((e) => e) || []; message.currency = (object.currency !== undefined && object.currency !== null) ? idNum.fromPartial(object.currency) : undefined; return message; }, }; function createBaseequipUpgradeStarRsp(): equipUpgradeStarRsp { return { errno: 0, data: undefined, same: [], other: [], currency: undefined }; } export const equipUpgradeStarRsp = { fromJSON(object: any): equipUpgradeStarRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? equip.fromJSON(object.data) : undefined, same: globalThis.Array.isArray(object?.same) ? object.same.map((e: any) => globalThis.String(e)) : [], other: globalThis.Array.isArray(object?.other) ? object.other.map((e: any) => globalThis.String(e)) : [], currency: isSet(object.currency) ? idNum.fromJSON(object.currency) : undefined, }; }, toJSON(message: equipUpgradeStarRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = equip.toJSON(message.data); } if (message.same?.length) { obj.same = message.same; } if (message.other?.length) { obj.other = message.other; } if (message.currency !== undefined) { obj.currency = idNum.toJSON(message.currency); } return obj; }, create, I>>(base?: I): equipUpgradeStarRsp { return equipUpgradeStarRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): equipUpgradeStarRsp { const message = createBaseequipUpgradeStarRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? equip.fromPartial(object.data) : undefined; message.same = object.same?.map((e) => e) || []; message.other = object.other?.map((e) => e) || []; message.currency = (object.currency !== undefined && object.currency !== null) ? idNum.fromPartial(object.currency) : undefined; return message; }, }; function createBaseequipOnekeyUpgradeStar(): equipOnekeyUpgradeStar { return {}; } export const equipOnekeyUpgradeStar = { fromJSON(_: any): equipOnekeyUpgradeStar { return {}; }, toJSON(_: equipOnekeyUpgradeStar): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): equipOnekeyUpgradeStar { return equipOnekeyUpgradeStar.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): equipOnekeyUpgradeStar { const message = createBaseequipOnekeyUpgradeStar(); return message; }, }; function createBaseequipOnekeyUpgradeStarRsp(): equipOnekeyUpgradeStarRsp { return { errno: 0, delList: [], changeList: [] }; } export const equipOnekeyUpgradeStarRsp = { fromJSON(object: any): equipOnekeyUpgradeStarRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, delList: globalThis.Array.isArray(object?.delList) ? object.delList.map((e: any) => globalThis.String(e)) : [], changeList: globalThis.Array.isArray(object?.changeList) ? object.changeList.map((e: any) => equip.fromJSON(e)) : [], }; }, toJSON(message: equipOnekeyUpgradeStarRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.delList?.length) { obj.delList = message.delList; } if (message.changeList?.length) { obj.changeList = message.changeList.map((e) => equip.toJSON(e)); } return obj; }, create, I>>(base?: I): equipOnekeyUpgradeStarRsp { return equipOnekeyUpgradeStarRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): equipOnekeyUpgradeStarRsp { const message = createBaseequipOnekeyUpgradeStarRsp(); message.errno = object.errno ?? 0; message.delList = object.delList?.map((e) => e) || []; message.changeList = object.changeList?.map((e) => equip.fromPartial(e)) || []; return message; }, }; function createBaseequipReset(): equipReset { return { level: false, sid: "" }; } export const equipReset = { fromJSON(object: any): equipReset { return { level: isSet(object.level) ? globalThis.Boolean(object.level) : false, sid: isSet(object.sid) ? globalThis.String(object.sid) : "", }; }, toJSON(message: equipReset): unknown { const obj: any = {}; if (message.level !== false) { obj.level = message.level; } if (message.sid !== "") { obj.sid = message.sid; } return obj; }, create, I>>(base?: I): equipReset { return equipReset.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): equipReset { const message = createBaseequipReset(); message.level = object.level ?? false; message.sid = object.sid ?? ""; return message; }, }; function createBaseequipResetRsp(): equipResetRsp { return { errno: 0, data: undefined }; } export const equipResetRsp = { fromJSON(object: any): equipResetRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? equip.fromJSON(object.data) : undefined, }; }, toJSON(message: equipResetRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = equip.toJSON(message.data); } return obj; }, create, I>>(base?: I): equipResetRsp { return equipResetRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): equipResetRsp { const message = createBaseequipResetRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? equip.fromPartial(object.data) : undefined; return message; }, }; function createBaseequipChangeNty(): equipChangeNty { return { list: [] }; } export const equipChangeNty = { fromJSON(object: any): equipChangeNty { return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => equip.fromJSON(e)) : [] }; }, toJSON(message: equipChangeNty): unknown { const obj: any = {}; if (message.list?.length) { obj.list = message.list.map((e) => equip.toJSON(e)); } return obj; }, create, I>>(base?: I): equipChangeNty { return equipChangeNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): equipChangeNty { const message = createBaseequipChangeNty(); message.list = object.list?.map((e) => equip.fromPartial(e)) || []; return message; }, }; function createBasetalentGetData(): talentGetData { return {}; } export const talentGetData = { fromJSON(_: any): talentGetData { return {}; }, toJSON(_: talentGetData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): talentGetData { return talentGetData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): talentGetData { const message = createBasetalentGetData(); return message; }, }; function createBasetalentGetDataRsp(): talentGetDataRsp { return { errno: 0, id1: 0, id2: 0 }; } export const talentGetDataRsp = { fromJSON(object: any): talentGetDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, id1: isSet(object.id1) ? globalThis.Number(object.id1) : 0, id2: isSet(object.id2) ? globalThis.Number(object.id2) : 0, }; }, toJSON(message: talentGetDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.id1 !== 0) { obj.id1 = Math.round(message.id1); } if (message.id2 !== 0) { obj.id2 = Math.round(message.id2); } return obj; }, create, I>>(base?: I): talentGetDataRsp { return talentGetDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): talentGetDataRsp { const message = createBasetalentGetDataRsp(); message.errno = object.errno ?? 0; message.id1 = object.id1 ?? 0; message.id2 = object.id2 ?? 0; return message; }, }; function createBasetalentActivate(): talentActivate { return { id: 0 }; } export const talentActivate = { fromJSON(object: any): talentActivate { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 }; }, toJSON(message: talentActivate): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): talentActivate { return talentActivate.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): talentActivate { const message = createBasetalentActivate(); message.id = object.id ?? 0; return message; }, }; function createBasetalentActivateRsp(): talentActivateRsp { return { errno: 0, id: 0 }; } export const talentActivateRsp = { fromJSON(object: any): talentActivateRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, id: isSet(object.id) ? globalThis.Number(object.id) : 0, }; }, toJSON(message: talentActivateRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): talentActivateRsp { return talentActivateRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): talentActivateRsp { const message = createBasetalentActivateRsp(); message.errno = object.errno ?? 0; message.id = object.id ?? 0; return message; }, }; function createBasesignInGetData(): signInGetData { return {}; } export const signInGetData = { fromJSON(_: any): signInGetData { return {}; }, toJSON(_: signInGetData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): signInGetData { return signInGetData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): signInGetData { const message = createBasesignInGetData(); return message; }, }; function createBasesignInGetDataRsp(): signInGetDataRsp { return { errno: 0 }; } export const signInGetDataRsp = { fromJSON(object: any): signInGetDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: signInGetDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): signInGetDataRsp { return signInGetDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): signInGetDataRsp { const message = createBasesignInGetDataRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBasesignInAward(): signInAward { return { day: 0 }; } export const signInAward = { fromJSON(object: any): signInAward { return { day: isSet(object.day) ? globalThis.Number(object.day) : 0 }; }, toJSON(message: signInAward): unknown { const obj: any = {}; if (message.day !== 0) { obj.day = Math.round(message.day); } return obj; }, create, I>>(base?: I): signInAward { return signInAward.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): signInAward { const message = createBasesignInAward(); message.day = object.day ?? 0; return message; }, }; function createBasesignInAwardRsp(): signInAwardRsp { return { errno: 0, day: 0, award: 0 }; } export const signInAwardRsp = { fromJSON(object: any): signInAwardRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, day: isSet(object.day) ? globalThis.Number(object.day) : 0, award: isSet(object.award) ? globalThis.Number(object.award) : 0, }; }, toJSON(message: signInAwardRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.day !== 0) { obj.day = Math.round(message.day); } if (message.award !== 0) { obj.award = Math.round(message.award); } return obj; }, create, I>>(base?: I): signInAwardRsp { return signInAwardRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): signInAwardRsp { const message = createBasesignInAwardRsp(); message.errno = object.errno ?? 0; message.day = object.day ?? 0; message.award = object.award ?? 0; return message; }, }; function createBasesignInNty(): signInNty { return { open: false, day: 0, award: 0, round: 0 }; } export const signInNty = { fromJSON(object: any): signInNty { return { open: isSet(object.open) ? globalThis.Boolean(object.open) : false, day: isSet(object.day) ? globalThis.Number(object.day) : 0, award: isSet(object.award) ? globalThis.Number(object.award) : 0, round: isSet(object.round) ? globalThis.Number(object.round) : 0, }; }, toJSON(message: signInNty): unknown { const obj: any = {}; if (message.open !== false) { obj.open = message.open; } if (message.day !== 0) { obj.day = Math.round(message.day); } if (message.award !== 0) { obj.award = Math.round(message.award); } if (message.round !== 0) { obj.round = Math.round(message.round); } return obj; }, create, I>>(base?: I): signInNty { return signInNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): signInNty { const message = createBasesignInNty(); message.open = object.open ?? false; message.day = object.day ?? 0; message.award = object.award ?? 0; message.round = object.round ?? 0; return message; }, }; function createBasequestGetData(): questGetData { return {}; } export const questGetData = { fromJSON(_: any): questGetData { return {}; }, toJSON(_: questGetData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): questGetData { return questGetData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): questGetData { const message = createBasequestGetData(); return message; }, }; function createBasequestGetDataRsp(): questGetDataRsp { return { errno: 0, dlv: 0, wlv: 0, daward: 0, waward: 0, daily: [], weekly: [], achievement: [], mainQuest: undefined, }; } export const questGetDataRsp = { fromJSON(object: any): questGetDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, dlv: isSet(object.dlv) ? globalThis.Number(object.dlv) : 0, wlv: isSet(object.wlv) ? globalThis.Number(object.wlv) : 0, daward: isSet(object.daward) ? globalThis.Number(object.daward) : 0, waward: isSet(object.waward) ? globalThis.Number(object.waward) : 0, daily: globalThis.Array.isArray(object?.daily) ? object.daily.map((e: any) => quest.fromJSON(e)) : [], weekly: globalThis.Array.isArray(object?.weekly) ? object.weekly.map((e: any) => quest.fromJSON(e)) : [], achievement: globalThis.Array.isArray(object?.achievement) ? object.achievement.map((e: any) => quest.fromJSON(e)) : [], mainQuest: isSet(object.mainQuest) ? quest.fromJSON(object.mainQuest) : undefined, }; }, toJSON(message: questGetDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.dlv !== 0) { obj.dlv = Math.round(message.dlv); } if (message.wlv !== 0) { obj.wlv = Math.round(message.wlv); } if (message.daward !== 0) { obj.daward = Math.round(message.daward); } if (message.waward !== 0) { obj.waward = Math.round(message.waward); } if (message.daily?.length) { obj.daily = message.daily.map((e) => quest.toJSON(e)); } if (message.weekly?.length) { obj.weekly = message.weekly.map((e) => quest.toJSON(e)); } if (message.achievement?.length) { obj.achievement = message.achievement.map((e) => quest.toJSON(e)); } if (message.mainQuest !== undefined) { obj.mainQuest = quest.toJSON(message.mainQuest); } return obj; }, create, I>>(base?: I): questGetDataRsp { return questGetDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): questGetDataRsp { const message = createBasequestGetDataRsp(); message.errno = object.errno ?? 0; message.dlv = object.dlv ?? 0; message.wlv = object.wlv ?? 0; message.daward = object.daward ?? 0; message.waward = object.waward ?? 0; message.daily = object.daily?.map((e) => quest.fromPartial(e)) || []; message.weekly = object.weekly?.map((e) => quest.fromPartial(e)) || []; message.achievement = object.achievement?.map((e) => quest.fromPartial(e)) || []; message.mainQuest = (object.mainQuest !== undefined && object.mainQuest !== null) ? quest.fromPartial(object.mainQuest) : undefined; return message; }, }; function createBasequestGetAward(): questGetAward { return { id: 0 }; } export const questGetAward = { fromJSON(object: any): questGetAward { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 }; }, toJSON(message: questGetAward): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): questGetAward { return questGetAward.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): questGetAward { const message = createBasequestGetAward(); message.id = object.id ?? 0; return message; }, }; function createBasequestGetAwardRsp(): questGetAwardRsp { return { errno: 0, id: 0, data: undefined }; } export const questGetAwardRsp = { fromJSON(object: any): questGetAwardRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, id: isSet(object.id) ? globalThis.Number(object.id) : 0, data: isSet(object.data) ? quest.fromJSON(object.data) : undefined, }; }, toJSON(message: questGetAwardRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.id !== 0) { obj.id = Math.round(message.id); } if (message.data !== undefined) { obj.data = quest.toJSON(message.data); } return obj; }, create, I>>(base?: I): questGetAwardRsp { return questGetAwardRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): questGetAwardRsp { const message = createBasequestGetAwardRsp(); message.errno = object.errno ?? 0; message.id = object.id ?? 0; message.data = (object.data !== undefined && object.data !== null) ? quest.fromPartial(object.data) : undefined; return message; }, }; function createBasequestActiveAward(): questActiveAward { return { type: 0 }; } export const questActiveAward = { fromJSON(object: any): questActiveAward { return { type: isSet(object.type) ? globalThis.Number(object.type) : 0 }; }, toJSON(message: questActiveAward): unknown { const obj: any = {}; if (message.type !== 0) { obj.type = Math.round(message.type); } return obj; }, create, I>>(base?: I): questActiveAward { return questActiveAward.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): questActiveAward { const message = createBasequestActiveAward(); message.type = object.type ?? 0; return message; }, }; function createBasequestActiveAwardRsp(): questActiveAwardRsp { return { errno: 0, type: 0, award: 0 }; } export const questActiveAwardRsp = { fromJSON(object: any): questActiveAwardRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, type: isSet(object.type) ? globalThis.Number(object.type) : 0, award: isSet(object.award) ? globalThis.Number(object.award) : 0, }; }, toJSON(message: questActiveAwardRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.type !== 0) { obj.type = Math.round(message.type); } if (message.award !== 0) { obj.award = Math.round(message.award); } return obj; }, create, I>>(base?: I): questActiveAwardRsp { return questActiveAwardRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): questActiveAwardRsp { const message = createBasequestActiveAwardRsp(); message.errno = object.errno ?? 0; message.type = object.type ?? 0; message.award = object.award ?? 0; return message; }, }; function createBasequestCmplateNotify(): questCmplateNotify { return { data: undefined }; } export const questCmplateNotify = { fromJSON(object: any): questCmplateNotify { return { data: isSet(object.data) ? quest.fromJSON(object.data) : undefined }; }, toJSON(message: questCmplateNotify): unknown { const obj: any = {}; if (message.data !== undefined) { obj.data = quest.toJSON(message.data); } return obj; }, create, I>>(base?: I): questCmplateNotify { return questCmplateNotify.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): questCmplateNotify { const message = createBasequestCmplateNotify(); message.data = (object.data !== undefined && object.data !== null) ? quest.fromPartial(object.data) : undefined; return message; }, }; function createBasemanualGetData(): manualGetData { return { moduleid: 0 }; } export const manualGetData = { fromJSON(object: any): manualGetData { return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 }; }, toJSON(message: manualGetData): unknown { const obj: any = {}; if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): manualGetData { return manualGetData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): manualGetData { const message = createBasemanualGetData(); message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasemanualGetDataRsp(): manualGetDataRsp { return { errno: 0, open: false, openTime: 0, level: 0, exp: 0, round: 0, list: [], moduleid: 0 }; } export const manualGetDataRsp = { fromJSON(object: any): manualGetDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, open: isSet(object.open) ? globalThis.Boolean(object.open) : false, openTime: isSet(object.openTime) ? globalThis.Number(object.openTime) : 0, level: isSet(object.level) ? globalThis.Number(object.level) : 0, exp: isSet(object.exp) ? globalThis.Number(object.exp) : 0, round: isSet(object.round) ? globalThis.Number(object.round) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => manual.fromJSON(e)) : [], moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, }; }, toJSON(message: manualGetDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.open !== false) { obj.open = message.open; } if (message.openTime !== 0) { obj.openTime = Math.round(message.openTime); } if (message.level !== 0) { obj.level = Math.round(message.level); } if (message.exp !== 0) { obj.exp = Math.round(message.exp); } if (message.round !== 0) { obj.round = Math.round(message.round); } if (message.list?.length) { obj.list = message.list.map((e) => manual.toJSON(e)); } if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): manualGetDataRsp { return manualGetDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): manualGetDataRsp { const message = createBasemanualGetDataRsp(); message.errno = object.errno ?? 0; message.open = object.open ?? false; message.openTime = object.openTime ?? 0; message.level = object.level ?? 0; message.exp = object.exp ?? 0; message.round = object.round ?? 0; message.list = object.list?.map((e) => manual.fromPartial(e)) || []; message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasemanualBuyExp(): manualBuyExp { return { moduleid: 0 }; } export const manualBuyExp = { fromJSON(object: any): manualBuyExp { return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 }; }, toJSON(message: manualBuyExp): unknown { const obj: any = {}; if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): manualBuyExp { return manualBuyExp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): manualBuyExp { const message = createBasemanualBuyExp(); message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasemanualBuyExpRsp(): manualBuyExpRsp { return { errno: 0, level: 0, exp: 0, moduleid: 0 }; } export const manualBuyExpRsp = { fromJSON(object: any): manualBuyExpRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, level: isSet(object.level) ? globalThis.Number(object.level) : 0, exp: isSet(object.exp) ? globalThis.Number(object.exp) : 0, moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, }; }, toJSON(message: manualBuyExpRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.level !== 0) { obj.level = Math.round(message.level); } if (message.exp !== 0) { obj.exp = Math.round(message.exp); } if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): manualBuyExpRsp { return manualBuyExpRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): manualBuyExpRsp { const message = createBasemanualBuyExpRsp(); message.errno = object.errno ?? 0; message.level = object.level ?? 0; message.exp = object.exp ?? 0; message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasemanualGetAward(): manualGetAward { return { moduleid: 0 }; } export const manualGetAward = { fromJSON(object: any): manualGetAward { return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 }; }, toJSON(message: manualGetAward): unknown { const obj: any = {}; if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): manualGetAward { return manualGetAward.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): manualGetAward { const message = createBasemanualGetAward(); message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasemanualGetAwardRsp(): manualGetAwardRsp { return { errno: 0, award: 0, moduleid: 0 }; } export const manualGetAwardRsp = { fromJSON(object: any): manualGetAwardRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, award: isSet(object.award) ? globalThis.Number(object.award) : 0, moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, }; }, toJSON(message: manualGetAwardRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.award !== 0) { obj.award = Math.round(message.award); } if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): manualGetAwardRsp { return manualGetAwardRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): manualGetAwardRsp { const message = createBasemanualGetAwardRsp(); message.errno = object.errno ?? 0; message.award = object.award ?? 0; message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasemanualNotify(): manualNotify { return { open: false, openTime: 0, level: 0, exp: 0, round: 0, list: [], moduleid: 0 }; } export const manualNotify = { fromJSON(object: any): manualNotify { return { open: isSet(object.open) ? globalThis.Boolean(object.open) : false, openTime: isSet(object.openTime) ? globalThis.Number(object.openTime) : 0, level: isSet(object.level) ? globalThis.Number(object.level) : 0, exp: isSet(object.exp) ? globalThis.Number(object.exp) : 0, round: isSet(object.round) ? globalThis.Number(object.round) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => manual.fromJSON(e)) : [], moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, }; }, toJSON(message: manualNotify): unknown { const obj: any = {}; if (message.open !== false) { obj.open = message.open; } if (message.openTime !== 0) { obj.openTime = Math.round(message.openTime); } if (message.level !== 0) { obj.level = Math.round(message.level); } if (message.exp !== 0) { obj.exp = Math.round(message.exp); } if (message.round !== 0) { obj.round = Math.round(message.round); } if (message.list?.length) { obj.list = message.list.map((e) => manual.toJSON(e)); } if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): manualNotify { return manualNotify.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): manualNotify { const message = createBasemanualNotify(); message.open = object.open ?? false; message.openTime = object.openTime ?? 0; message.level = object.level ?? 0; message.exp = object.exp ?? 0; message.round = object.round ?? 0; message.list = object.list?.map((e) => manual.fromPartial(e)) || []; message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasemanualBuy(): manualBuy { return { giftid: 0, moduleid: 0 }; } export const manualBuy = { fromJSON(object: any): manualBuy { return { giftid: isSet(object.giftid) ? globalThis.Number(object.giftid) : 0, moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, }; }, toJSON(message: manualBuy): unknown { const obj: any = {}; if (message.giftid !== 0) { obj.giftid = Math.round(message.giftid); } if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): manualBuy { return manualBuy.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): manualBuy { const message = createBasemanualBuy(); message.giftid = object.giftid ?? 0; message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasemanualBuyRsp(): manualBuyRsp { return { errno: 0, moduleid: 0 }; } export const manualBuyRsp = { fromJSON(object: any): manualBuyRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, }; }, toJSON(message: manualBuyRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): manualBuyRsp { return manualBuyRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): manualBuyRsp { const message = createBasemanualBuyRsp(); message.errno = object.errno ?? 0; message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasedraw(): draw { return { drawType: 0, payType: 0, num: 0 }; } export const draw = { fromJSON(object: any): draw { return { drawType: isSet(object.drawType) ? globalThis.Number(object.drawType) : 0, payType: isSet(object.payType) ? globalThis.Number(object.payType) : 0, num: isSet(object.num) ? globalThis.Number(object.num) : 0, }; }, toJSON(message: draw): unknown { const obj: any = {}; if (message.drawType !== 0) { obj.drawType = Math.round(message.drawType); } if (message.payType !== 0) { obj.payType = Math.round(message.payType); } if (message.num !== 0) { obj.num = Math.round(message.num); } return obj; }, create, I>>(base?: I): draw { return draw.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): draw { const message = createBasedraw(); message.drawType = object.drawType ?? 0; message.payType = object.payType ?? 0; message.num = object.num ?? 0; return message; }, }; function createBasedrawRsp(): drawRsp { return { errno: 0, drawType: 0, daily: 0, free: 0, list: [], awardList: [] }; } export const drawRsp = { fromJSON(object: any): drawRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, drawType: isSet(object.drawType) ? globalThis.Number(object.drawType) : 0, daily: isSet(object.daily) ? globalThis.Number(object.daily) : 0, free: isSet(object.free) ? globalThis.Number(object.free) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.Number(e)) : [], awardList: globalThis.Array.isArray(object?.awardList) ? object.awardList.map((e: any) => drawAwardInfo.fromJSON(e)) : [], }; }, toJSON(message: drawRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.drawType !== 0) { obj.drawType = Math.round(message.drawType); } if (message.daily !== 0) { obj.daily = Math.round(message.daily); } if (message.free !== 0) { obj.free = Math.round(message.free); } if (message.list?.length) { obj.list = message.list.map((e) => Math.round(e)); } if (message.awardList?.length) { obj.awardList = message.awardList.map((e) => drawAwardInfo.toJSON(e)); } return obj; }, create, I>>(base?: I): drawRsp { return drawRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): drawRsp { const message = createBasedrawRsp(); message.errno = object.errno ?? 0; message.drawType = object.drawType ?? 0; message.daily = object.daily ?? 0; message.free = object.free ?? 0; message.list = object.list?.map((e) => e) || []; message.awardList = object.awardList?.map((e) => drawAwardInfo.fromPartial(e)) || []; return message; }, }; function createBasedrawGetData(): drawGetData { return {}; } export const drawGetData = { fromJSON(_: any): drawGetData { return {}; }, toJSON(_: drawGetData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): drawGetData { return drawGetData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): drawGetData { const message = createBasedrawGetData(); return message; }, }; function createBasedrawGetDataRsp(): drawGetDataRsp { return { errno: 0, hero: undefined, hero2: undefined, equip: undefined }; } export const drawGetDataRsp = { fromJSON(object: any): drawGetDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, hero: isSet(object.hero) ? drawInfo.fromJSON(object.hero) : undefined, hero2: isSet(object.hero2) ? drawInfo.fromJSON(object.hero2) : undefined, equip: isSet(object.equip) ? drawInfo.fromJSON(object.equip) : undefined, }; }, toJSON(message: drawGetDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.hero !== undefined) { obj.hero = drawInfo.toJSON(message.hero); } if (message.hero2 !== undefined) { obj.hero2 = drawInfo.toJSON(message.hero2); } if (message.equip !== undefined) { obj.equip = drawInfo.toJSON(message.equip); } return obj; }, create, I>>(base?: I): drawGetDataRsp { return drawGetDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): drawGetDataRsp { const message = createBasedrawGetDataRsp(); message.errno = object.errno ?? 0; message.hero = (object.hero !== undefined && object.hero !== null) ? drawInfo.fromPartial(object.hero) : undefined; message.hero2 = (object.hero2 !== undefined && object.hero2 !== null) ? drawInfo.fromPartial(object.hero2) : undefined; message.equip = (object.equip !== undefined && object.equip !== null) ? drawInfo.fromPartial(object.equip) : undefined; return message; }, }; function createBaseshopData(): shopData { return {}; } export const shopData = { fromJSON(_: any): shopData { return {}; }, toJSON(_: shopData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): shopData { return shopData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): shopData { const message = createBaseshopData(); return message; }, }; function createBaseshopDataRsp(): shopDataRsp { return { errno: 0, list: [] }; } export const shopDataRsp = { fromJSON(object: any): shopDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => shopInfo.fromJSON(e)) : [], }; }, toJSON(message: shopDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => shopInfo.toJSON(e)); } return obj; }, create, I>>(base?: I): shopDataRsp { return shopDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): shopDataRsp { const message = createBaseshopDataRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => shopInfo.fromPartial(e)) || []; return message; }, }; function createBaseshopBuy(): shopBuy { return { type: 0, id: 0, num: 0 }; } export const shopBuy = { fromJSON(object: any): shopBuy { return { type: isSet(object.type) ? globalThis.Number(object.type) : 0, id: isSet(object.id) ? globalThis.Number(object.id) : 0, num: isSet(object.num) ? globalThis.Number(object.num) : 0, }; }, toJSON(message: shopBuy): unknown { const obj: any = {}; if (message.type !== 0) { obj.type = Math.round(message.type); } if (message.id !== 0) { obj.id = Math.round(message.id); } if (message.num !== 0) { obj.num = Math.round(message.num); } return obj; }, create, I>>(base?: I): shopBuy { return shopBuy.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): shopBuy { const message = createBaseshopBuy(); message.type = object.type ?? 0; message.id = object.id ?? 0; message.num = object.num ?? 0; return message; }, }; function createBaseshopBuyRsp(): shopBuyRsp { return { errno: 0 }; } export const shopBuyRsp = { fromJSON(object: any): shopBuyRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: shopBuyRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): shopBuyRsp { return shopBuyRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): shopBuyRsp { const message = createBaseshopBuyRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaseshopNotify(): shopNotify { return { type: 0, id: 0, num: 0 }; } export const shopNotify = { fromJSON(object: any): shopNotify { return { type: isSet(object.type) ? globalThis.Number(object.type) : 0, id: isSet(object.id) ? globalThis.Number(object.id) : 0, num: isSet(object.num) ? globalThis.Number(object.num) : 0, }; }, toJSON(message: shopNotify): unknown { const obj: any = {}; if (message.type !== 0) { obj.type = Math.round(message.type); } if (message.id !== 0) { obj.id = Math.round(message.id); } if (message.num !== 0) { obj.num = Math.round(message.num); } return obj; }, create, I>>(base?: I): shopNotify { return shopNotify.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): shopNotify { const message = createBaseshopNotify(); message.type = object.type ?? 0; message.id = object.id ?? 0; message.num = object.num ?? 0; return message; }, }; function createBaserankingData(): rankingData { return { type: 0 }; } export const rankingData = { fromJSON(object: any): rankingData { return { type: isSet(object.type) ? globalThis.Number(object.type) : 0 }; }, toJSON(message: rankingData): unknown { const obj: any = {}; if (message.type !== 0) { obj.type = Math.round(message.type); } return obj; }, create, I>>(base?: I): rankingData { return rankingData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): rankingData { const message = createBaserankingData(); message.type = object.type ?? 0; return message; }, }; function createBaserankingDataRsp(): rankingDataRsp { return { errno: 0, type: 0, list: [], myslef: undefined }; } export const rankingDataRsp = { fromJSON(object: any): rankingDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, type: isSet(object.type) ? globalThis.Number(object.type) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => rankingInfo.fromJSON(e)) : [], myslef: isSet(object.myslef) ? rankingInfo.fromJSON(object.myslef) : undefined, }; }, toJSON(message: rankingDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.type !== 0) { obj.type = Math.round(message.type); } if (message.list?.length) { obj.list = message.list.map((e) => rankingInfo.toJSON(e)); } if (message.myslef !== undefined) { obj.myslef = rankingInfo.toJSON(message.myslef); } return obj; }, create, I>>(base?: I): rankingDataRsp { return rankingDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): rankingDataRsp { const message = createBaserankingDataRsp(); message.errno = object.errno ?? 0; message.type = object.type ?? 0; message.list = object.list?.map((e) => rankingInfo.fromPartial(e)) || []; message.myslef = (object.myslef !== undefined && object.myslef !== null) ? rankingInfo.fromPartial(object.myslef) : undefined; return message; }, }; function createBasegroceryData(): groceryData { return { type: 0 }; } export const groceryData = { fromJSON(object: any): groceryData { return { type: isSet(object.type) ? globalThis.Number(object.type) : 0 }; }, toJSON(message: groceryData): unknown { const obj: any = {}; if (message.type !== 0) { obj.type = Math.round(message.type); } return obj; }, create, I>>(base?: I): groceryData { return groceryData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): groceryData { const message = createBasegroceryData(); message.type = object.type ?? 0; return message; }, }; function createBasegroceryDataRsp(): groceryDataRsp { return { errno: 0, data: undefined }; } export const groceryDataRsp = { fromJSON(object: any): groceryDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? groceryInfo.fromJSON(object.data) : undefined, }; }, toJSON(message: groceryDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = groceryInfo.toJSON(message.data); } return obj; }, create, I>>(base?: I): groceryDataRsp { return groceryDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): groceryDataRsp { const message = createBasegroceryDataRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? groceryInfo.fromPartial(object.data) : undefined; return message; }, }; function createBasegroceryBuy(): groceryBuy { return { type: 0, free: false }; } export const groceryBuy = { fromJSON(object: any): groceryBuy { return { type: isSet(object.type) ? globalThis.Number(object.type) : 0, free: isSet(object.free) ? globalThis.Boolean(object.free) : false, }; }, toJSON(message: groceryBuy): unknown { const obj: any = {}; if (message.type !== 0) { obj.type = Math.round(message.type); } if (message.free !== false) { obj.free = message.free; } return obj; }, create, I>>(base?: I): groceryBuy { return groceryBuy.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): groceryBuy { const message = createBasegroceryBuy(); message.type = object.type ?? 0; message.free = object.free ?? false; return message; }, }; function createBasegroceryBuyRsp(): groceryBuyRsp { return { errno: 0, data: undefined }; } export const groceryBuyRsp = { fromJSON(object: any): groceryBuyRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? groceryInfo.fromJSON(object.data) : undefined, }; }, toJSON(message: groceryBuyRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = groceryInfo.toJSON(message.data); } return obj; }, create, I>>(base?: I): groceryBuyRsp { return groceryBuyRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): groceryBuyRsp { const message = createBasegroceryBuyRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? groceryInfo.fromPartial(object.data) : undefined; return message; }, }; function createBasealtarData(): altarData { return {}; } export const altarData = { fromJSON(_: any): altarData { return {}; }, toJSON(_: altarData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): altarData { return altarData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): altarData { const message = createBasealtarData(); return message; }, }; function createBasealtarDataRsp(): altarDataRsp { return { errno: 0, baseList: [], list: [], buyNum: 0, equipFree: 0, heroFree: 0 }; } export const altarDataRsp = { fromJSON(object: any): altarDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, baseList: globalThis.Array.isArray(object?.baseList) ? object.baseList.map((e: any) => globalThis.String(e)) : [], list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => altarInfo.fromJSON(e)) : [], buyNum: isSet(object.buyNum) ? globalThis.Number(object.buyNum) : 0, equipFree: isSet(object.equipFree) ? globalThis.Number(object.equipFree) : 0, heroFree: isSet(object.heroFree) ? globalThis.Number(object.heroFree) : 0, }; }, toJSON(message: altarDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.baseList?.length) { obj.baseList = message.baseList; } if (message.list?.length) { obj.list = message.list.map((e) => altarInfo.toJSON(e)); } if (message.buyNum !== 0) { obj.buyNum = Math.round(message.buyNum); } if (message.equipFree !== 0) { obj.equipFree = Math.round(message.equipFree); } if (message.heroFree !== 0) { obj.heroFree = Math.round(message.heroFree); } return obj; }, create, I>>(base?: I): altarDataRsp { return altarDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): altarDataRsp { const message = createBasealtarDataRsp(); message.errno = object.errno ?? 0; message.baseList = object.baseList?.map((e) => e) || []; message.list = object.list?.map((e) => altarInfo.fromPartial(e)) || []; message.buyNum = object.buyNum ?? 0; message.equipFree = object.equipFree ?? 0; message.heroFree = object.heroFree ?? 0; return message; }, }; function createBasealtarBattle(): altarBattle { return { pos: 0, sid: "" }; } export const altarBattle = { fromJSON(object: any): altarBattle { return { pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0, sid: isSet(object.sid) ? globalThis.String(object.sid) : "", }; }, toJSON(message: altarBattle): unknown { const obj: any = {}; if (message.pos !== 0) { obj.pos = Math.round(message.pos); } if (message.sid !== "") { obj.sid = message.sid; } return obj; }, create, I>>(base?: I): altarBattle { return altarBattle.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): altarBattle { const message = createBasealtarBattle(); message.pos = object.pos ?? 0; message.sid = object.sid ?? ""; return message; }, }; function createBasealtarBattleRsp(): altarBattleRsp { return { errno: 0, pos: 0, data: undefined }; } export const altarBattleRsp = { fromJSON(object: any): altarBattleRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0, data: isSet(object.data) ? altarInfo.fromJSON(object.data) : undefined, }; }, toJSON(message: altarBattleRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.pos !== 0) { obj.pos = Math.round(message.pos); } if (message.data !== undefined) { obj.data = altarInfo.toJSON(message.data); } return obj; }, create, I>>(base?: I): altarBattleRsp { return altarBattleRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): altarBattleRsp { const message = createBasealtarBattleRsp(); message.errno = object.errno ?? 0; message.pos = object.pos ?? 0; message.data = (object.data !== undefined && object.data !== null) ? altarInfo.fromPartial(object.data) : undefined; return message; }, }; function createBasealtarExchange(): altarExchange { return { type: 0, sid: "" }; } export const altarExchange = { fromJSON(object: any): altarExchange { return { type: isSet(object.type) ? globalThis.Number(object.type) : 0, sid: isSet(object.sid) ? globalThis.String(object.sid) : "", }; }, toJSON(message: altarExchange): unknown { const obj: any = {}; if (message.type !== 0) { obj.type = Math.round(message.type); } if (message.sid !== "") { obj.sid = message.sid; } return obj; }, create, I>>(base?: I): altarExchange { return altarExchange.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): altarExchange { const message = createBasealtarExchange(); message.type = object.type ?? 0; message.sid = object.sid ?? ""; return message; }, }; function createBasealtarExchangeRsp(): altarExchangeRsp { return { errno: 0, type: 0, sid: "", id: 0 }; } export const altarExchangeRsp = { fromJSON(object: any): altarExchangeRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, type: isSet(object.type) ? globalThis.Number(object.type) : 0, sid: isSet(object.sid) ? globalThis.String(object.sid) : "", id: isSet(object.id) ? globalThis.Number(object.id) : 0, }; }, toJSON(message: altarExchangeRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.type !== 0) { obj.type = Math.round(message.type); } if (message.sid !== "") { obj.sid = message.sid; } if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): altarExchangeRsp { return altarExchangeRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): altarExchangeRsp { const message = createBasealtarExchangeRsp(); message.errno = object.errno ?? 0; message.type = object.type ?? 0; message.sid = object.sid ?? ""; message.id = object.id ?? 0; return message; }, }; function createBasealtarExchangeConfirm(): altarExchangeConfirm { return { type: 0, sid: "", change: false }; } export const altarExchangeConfirm = { fromJSON(object: any): altarExchangeConfirm { return { type: isSet(object.type) ? globalThis.Number(object.type) : 0, sid: isSet(object.sid) ? globalThis.String(object.sid) : "", change: isSet(object.change) ? globalThis.Boolean(object.change) : false, }; }, toJSON(message: altarExchangeConfirm): unknown { const obj: any = {}; if (message.type !== 0) { obj.type = Math.round(message.type); } if (message.sid !== "") { obj.sid = message.sid; } if (message.change !== false) { obj.change = message.change; } return obj; }, create, I>>(base?: I): altarExchangeConfirm { return altarExchangeConfirm.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): altarExchangeConfirm { const message = createBasealtarExchangeConfirm(); message.type = object.type ?? 0; message.sid = object.sid ?? ""; message.change = object.change ?? false; return message; }, }; function createBasealtarExchangeConfirmRsp(): altarExchangeConfirmRsp { return { errno: 0 }; } export const altarExchangeConfirmRsp = { fromJSON(object: any): altarExchangeConfirmRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: altarExchangeConfirmRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): altarExchangeConfirmRsp { return altarExchangeConfirmRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): altarExchangeConfirmRsp { const message = createBasealtarExchangeConfirmRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBasealtarBuyBattleSpace(): altarBuyBattleSpace { return {}; } export const altarBuyBattleSpace = { fromJSON(_: any): altarBuyBattleSpace { return {}; }, toJSON(_: altarBuyBattleSpace): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): altarBuyBattleSpace { return altarBuyBattleSpace.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): altarBuyBattleSpace { const message = createBasealtarBuyBattleSpace(); return message; }, }; function createBasealtarBuyBattleSpaceRsp(): altarBuyBattleSpaceRsp { return { errno: 0, pos: 0, data: undefined }; } export const altarBuyBattleSpaceRsp = { fromJSON(object: any): altarBuyBattleSpaceRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0, data: isSet(object.data) ? altarInfo.fromJSON(object.data) : undefined, }; }, toJSON(message: altarBuyBattleSpaceRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.pos !== 0) { obj.pos = Math.round(message.pos); } if (message.data !== undefined) { obj.data = altarInfo.toJSON(message.data); } return obj; }, create, I>>(base?: I): altarBuyBattleSpaceRsp { return altarBuyBattleSpaceRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): altarBuyBattleSpaceRsp { const message = createBasealtarBuyBattleSpaceRsp(); message.errno = object.errno ?? 0; message.pos = object.pos ?? 0; message.data = (object.data !== undefined && object.data !== null) ? altarInfo.fromPartial(object.data) : undefined; return message; }, }; function createBasealtarResetCd(): altarResetCd { return { pos: 0 }; } export const altarResetCd = { fromJSON(object: any): altarResetCd { return { pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0 }; }, toJSON(message: altarResetCd): unknown { const obj: any = {}; if (message.pos !== 0) { obj.pos = Math.round(message.pos); } return obj; }, create, I>>(base?: I): altarResetCd { return altarResetCd.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): altarResetCd { const message = createBasealtarResetCd(); message.pos = object.pos ?? 0; return message; }, }; function createBasealtarResetCdRsp(): altarResetCdRsp { return { errno: 0, pos: 0, data: undefined }; } export const altarResetCdRsp = { fromJSON(object: any): altarResetCdRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0, data: isSet(object.data) ? altarInfo.fromJSON(object.data) : undefined, }; }, toJSON(message: altarResetCdRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.pos !== 0) { obj.pos = Math.round(message.pos); } if (message.data !== undefined) { obj.data = altarInfo.toJSON(message.data); } return obj; }, create, I>>(base?: I): altarResetCdRsp { return altarResetCdRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): altarResetCdRsp { const message = createBasealtarResetCdRsp(); message.errno = object.errno ?? 0; message.pos = object.pos ?? 0; message.data = (object.data !== undefined && object.data !== null) ? altarInfo.fromPartial(object.data) : undefined; return message; }, }; function createBaserelicData(): relicData { return {}; } export const relicData = { fromJSON(_: any): relicData { return {}; }, toJSON(_: relicData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): relicData { return relicData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): relicData { const message = createBaserelicData(); return message; }, }; function createBaserelicDataRsp(): relicDataRsp { return { errno: 0 }; } export const relicDataRsp = { fromJSON(object: any): relicDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: relicDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): relicDataRsp { return relicDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): relicDataRsp { const message = createBaserelicDataRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaserelicNextPos(): relicNextPos { return { pos: 0 }; } export const relicNextPos = { fromJSON(object: any): relicNextPos { return { pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0 }; }, toJSON(message: relicNextPos): unknown { const obj: any = {}; if (message.pos !== 0) { obj.pos = Math.round(message.pos); } return obj; }, create, I>>(base?: I): relicNextPos { return relicNextPos.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): relicNextPos { const message = createBaserelicNextPos(); message.pos = object.pos ?? 0; return message; }, }; function createBaserelicNextPosRsp(): relicNextPosRsp { return { errno: 0 }; } export const relicNextPosRsp = { fromJSON(object: any): relicNextPosRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: relicNextPosRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): relicNextPosRsp { return relicNextPosRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): relicNextPosRsp { const message = createBaserelicNextPosRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaserelicNextLayer(): relicNextLayer { return {}; } export const relicNextLayer = { fromJSON(_: any): relicNextLayer { return {}; }, toJSON(_: relicNextLayer): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): relicNextLayer { return relicNextLayer.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): relicNextLayer { const message = createBaserelicNextLayer(); return message; }, }; function createBaserelicNextLayerRsp(): relicNextLayerRsp { return { errno: 0 }; } export const relicNextLayerRsp = { fromJSON(object: any): relicNextLayerRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: relicNextLayerRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): relicNextLayerRsp { return relicNextLayerRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): relicNextLayerRsp { const message = createBaserelicNextLayerRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaserelicSelectBuff(): relicSelectBuff { return {}; } export const relicSelectBuff = { fromJSON(_: any): relicSelectBuff { return {}; }, toJSON(_: relicSelectBuff): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): relicSelectBuff { return relicSelectBuff.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): relicSelectBuff { const message = createBaserelicSelectBuff(); return message; }, }; function createBaserelicSelectBuffRsp(): relicSelectBuffRsp { return { errno: 0 }; } export const relicSelectBuffRsp = { fromJSON(object: any): relicSelectBuffRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: relicSelectBuffRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): relicSelectBuffRsp { return relicSelectBuffRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): relicSelectBuffRsp { const message = createBaserelicSelectBuffRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaserelicReset(): relicReset { return { difficulty: 0 }; } export const relicReset = { fromJSON(object: any): relicReset { return { difficulty: isSet(object.difficulty) ? globalThis.Number(object.difficulty) : 0 }; }, toJSON(message: relicReset): unknown { const obj: any = {}; if (message.difficulty !== 0) { obj.difficulty = Math.round(message.difficulty); } return obj; }, create, I>>(base?: I): relicReset { return relicReset.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): relicReset { const message = createBaserelicReset(); message.difficulty = object.difficulty ?? 0; return message; }, }; function createBaserelicResetRsp(): relicResetRsp { return { errno: 0 }; } export const relicResetRsp = { fromJSON(object: any): relicResetRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: relicResetRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): relicResetRsp { return relicResetRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): relicResetRsp { const message = createBaserelicResetRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaserelicEventSelect(): relicEventSelect { return { type: 0, win: false, cost: 0, select: 0 }; } export const relicEventSelect = { fromJSON(object: any): relicEventSelect { return { type: isSet(object.type) ? globalThis.Number(object.type) : 0, win: isSet(object.win) ? globalThis.Boolean(object.win) : false, cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0, select: isSet(object.select) ? globalThis.Number(object.select) : 0, }; }, toJSON(message: relicEventSelect): unknown { const obj: any = {}; if (message.type !== 0) { obj.type = Math.round(message.type); } if (message.win !== false) { obj.win = message.win; } if (message.cost !== 0) { obj.cost = Math.round(message.cost); } if (message.select !== 0) { obj.select = Math.round(message.select); } return obj; }, create, I>>(base?: I): relicEventSelect { return relicEventSelect.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): relicEventSelect { const message = createBaserelicEventSelect(); message.type = object.type ?? 0; message.win = object.win ?? false; message.cost = object.cost ?? 0; message.select = object.select ?? 0; return message; }, }; function createBaserelicEventSelectRsp(): relicEventSelectRsp { return { errno: 0 }; } export const relicEventSelectRsp = { fromJSON(object: any): relicEventSelectRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: relicEventSelectRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): relicEventSelectRsp { return relicEventSelectRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): relicEventSelectRsp { const message = createBaserelicEventSelectRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaserelicDataNty(): relicDataNty { return { maxDiff: 0, curDiff: 0, buffList: [], layer: 0, pos: 0, cost: 0, state: 0, resetTime: 0, posList: [], battleInfo: [], }; } export const relicDataNty = { fromJSON(object: any): relicDataNty { return { maxDiff: isSet(object.maxDiff) ? globalThis.Number(object.maxDiff) : 0, curDiff: isSet(object.curDiff) ? globalThis.Number(object.curDiff) : 0, buffList: globalThis.Array.isArray(object?.buffList) ? object.buffList.map((e: any) => globalThis.Number(e)) : [], layer: isSet(object.layer) ? globalThis.Number(object.layer) : 0, pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0, cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0, state: isSet(object.state) ? globalThis.Number(object.state) : 0, resetTime: isSet(object.resetTime) ? globalThis.Number(object.resetTime) : 0, posList: globalThis.Array.isArray(object?.posList) ? object.posList.map((e: any) => globalThis.Number(e)) : [], battleInfo: globalThis.Array.isArray(object?.battleInfo) ? object.battleInfo.map((e: any) => globalThis.Number(e)) : [], }; }, toJSON(message: relicDataNty): unknown { const obj: any = {}; if (message.maxDiff !== 0) { obj.maxDiff = Math.round(message.maxDiff); } if (message.curDiff !== 0) { obj.curDiff = Math.round(message.curDiff); } if (message.buffList?.length) { obj.buffList = message.buffList.map((e) => Math.round(e)); } if (message.layer !== 0) { obj.layer = Math.round(message.layer); } if (message.pos !== 0) { obj.pos = Math.round(message.pos); } if (message.cost !== 0) { obj.cost = Math.round(message.cost); } if (message.state !== 0) { obj.state = Math.round(message.state); } if (message.resetTime !== 0) { obj.resetTime = Math.round(message.resetTime); } if (message.posList?.length) { obj.posList = message.posList.map((e) => Math.round(e)); } if (message.battleInfo?.length) { obj.battleInfo = message.battleInfo.map((e) => Math.round(e)); } return obj; }, create, I>>(base?: I): relicDataNty { return relicDataNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): relicDataNty { const message = createBaserelicDataNty(); message.maxDiff = object.maxDiff ?? 0; message.curDiff = object.curDiff ?? 0; message.buffList = object.buffList?.map((e) => e) || []; message.layer = object.layer ?? 0; message.pos = object.pos ?? 0; message.cost = object.cost ?? 0; message.state = object.state ?? 0; message.resetTime = object.resetTime ?? 0; message.posList = object.posList?.map((e) => e) || []; message.battleInfo = object.battleInfo?.map((e) => e) || []; return message; }, }; function createBaserelicEventNty(): relicEventNty { return { type: 0, battleId: 0, battleType: 0, selectBuff: [] }; } export const relicEventNty = { fromJSON(object: any): relicEventNty { return { type: isSet(object.type) ? globalThis.Number(object.type) : 0, battleId: isSet(object.battleId) ? globalThis.Number(object.battleId) : 0, battleType: isSet(object.battleType) ? globalThis.Number(object.battleType) : 0, selectBuff: globalThis.Array.isArray(object?.selectBuff) ? object.selectBuff.map((e: any) => globalThis.Number(e)) : [], }; }, toJSON(message: relicEventNty): unknown { const obj: any = {}; if (message.type !== 0) { obj.type = Math.round(message.type); } if (message.battleId !== 0) { obj.battleId = Math.round(message.battleId); } if (message.battleType !== 0) { obj.battleType = Math.round(message.battleType); } if (message.selectBuff?.length) { obj.selectBuff = message.selectBuff.map((e) => Math.round(e)); } return obj; }, create, I>>(base?: I): relicEventNty { return relicEventNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): relicEventNty { const message = createBaserelicEventNty(); message.type = object.type ?? 0; message.battleId = object.battleId ?? 0; message.battleType = object.battleType ?? 0; message.selectBuff = object.selectBuff?.map((e) => e) || []; return message; }, }; function createBaseactivityTimeListNty(): activityTimeListNty { return { list: [] }; } export const activityTimeListNty = { fromJSON(object: any): activityTimeListNty { return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => activityTimeInfo.fromJSON(e)) : [], }; }, toJSON(message: activityTimeListNty): unknown { const obj: any = {}; if (message.list?.length) { obj.list = message.list.map((e) => activityTimeInfo.toJSON(e)); } return obj; }, create, I>>(base?: I): activityTimeListNty { return activityTimeListNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): activityTimeListNty { const message = createBaseactivityTimeListNty(); message.list = object.list?.map((e) => activityTimeInfo.fromPartial(e)) || []; return message; }, }; function createBaseactivityGetConfList(): activityGetConfList { return { list: [] }; } export const activityGetConfList = { fromJSON(object: any): activityGetConfList { return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [] }; }, toJSON(message: activityGetConfList): unknown { const obj: any = {}; if (message.list?.length) { obj.list = message.list; } return obj; }, create, I>>(base?: I): activityGetConfList { return activityGetConfList.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): activityGetConfList { const message = createBaseactivityGetConfList(); message.list = object.list?.map((e) => e) || []; return message; }, }; function createBaseactivityGetConfListRsp(): activityGetConfListRsp { return { errno: 0, list: [] }; } export const activityGetConfListRsp = { fromJSON(object: any): activityGetConfListRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => activityConfInfo.fromJSON(e)) : [], }; }, toJSON(message: activityGetConfListRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => activityConfInfo.toJSON(e)); } return obj; }, create, I>>(base?: I): activityGetConfListRsp { return activityGetConfListRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): activityGetConfListRsp { const message = createBaseactivityGetConfListRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => activityConfInfo.fromPartial(e)) || []; return message; }, }; function createBaseactivityGetConfNty(): activityGetConfNty { return { list: [] }; } export const activityGetConfNty = { fromJSON(object: any): activityGetConfNty { return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.Number(e)) : [] }; }, toJSON(message: activityGetConfNty): unknown { const obj: any = {}; if (message.list?.length) { obj.list = message.list.map((e) => Math.round(e)); } return obj; }, create, I>>(base?: I): activityGetConfNty { return activityGetConfNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): activityGetConfNty { const message = createBaseactivityGetConfNty(); message.list = object.list?.map((e) => e) || []; return message; }, }; function createBaseprivilegeCardData(): privilegeCardData { return {}; } export const privilegeCardData = { fromJSON(_: any): privilegeCardData { return {}; }, toJSON(_: privilegeCardData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): privilegeCardData { return privilegeCardData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): privilegeCardData { const message = createBaseprivilegeCardData(); return message; }, }; function createBaseprivilegeCardDataRsp(): privilegeCardDataRsp { return { errno: 0, list: [] }; } export const privilegeCardDataRsp = { fromJSON(object: any): privilegeCardDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => privilegeCardInfo.fromJSON(e)) : [], }; }, toJSON(message: privilegeCardDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => privilegeCardInfo.toJSON(e)); } return obj; }, create, I>>(base?: I): privilegeCardDataRsp { return privilegeCardDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): privilegeCardDataRsp { const message = createBaseprivilegeCardDataRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => privilegeCardInfo.fromPartial(e)) || []; return message; }, }; function createBaseprivilegeCardBuy(): privilegeCardBuy { return { moduleid: 0 }; } export const privilegeCardBuy = { fromJSON(object: any): privilegeCardBuy { return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 }; }, toJSON(message: privilegeCardBuy): unknown { const obj: any = {}; if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): privilegeCardBuy { return privilegeCardBuy.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): privilegeCardBuy { const message = createBaseprivilegeCardBuy(); message.moduleid = object.moduleid ?? 0; return message; }, }; function createBaseprivilegeCardBuyRsp(): privilegeCardBuyRsp { return { errno: 0 }; } export const privilegeCardBuyRsp = { fromJSON(object: any): privilegeCardBuyRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: privilegeCardBuyRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): privilegeCardBuyRsp { return privilegeCardBuyRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): privilegeCardBuyRsp { const message = createBaseprivilegeCardBuyRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaseprivilegeCardUnlockNty(): privilegeCardUnlockNty { return { data: undefined }; } export const privilegeCardUnlockNty = { fromJSON(object: any): privilegeCardUnlockNty { return { data: isSet(object.data) ? privilegeCardInfo.fromJSON(object.data) : undefined }; }, toJSON(message: privilegeCardUnlockNty): unknown { const obj: any = {}; if (message.data !== undefined) { obj.data = privilegeCardInfo.toJSON(message.data); } return obj; }, create, I>>(base?: I): privilegeCardUnlockNty { return privilegeCardUnlockNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): privilegeCardUnlockNty { const message = createBaseprivilegeCardUnlockNty(); message.data = (object.data !== undefined && object.data !== null) ? privilegeCardInfo.fromPartial(object.data) : undefined; return message; }, }; function createBaseprivilegeCardAward(): privilegeCardAward { return { moduleid: 0 }; } export const privilegeCardAward = { fromJSON(object: any): privilegeCardAward { return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 }; }, toJSON(message: privilegeCardAward): unknown { const obj: any = {}; if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): privilegeCardAward { return privilegeCardAward.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): privilegeCardAward { const message = createBaseprivilegeCardAward(); message.moduleid = object.moduleid ?? 0; return message; }, }; function createBaseprivilegeCardAwardRsp(): privilegeCardAwardRsp { return { errno: 0, moduleid: 0, award: false }; } export const privilegeCardAwardRsp = { fromJSON(object: any): privilegeCardAwardRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, award: isSet(object.award) ? globalThis.Boolean(object.award) : false, }; }, toJSON(message: privilegeCardAwardRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } if (message.award !== false) { obj.award = message.award; } return obj; }, create, I>>(base?: I): privilegeCardAwardRsp { return privilegeCardAwardRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): privilegeCardAwardRsp { const message = createBaseprivilegeCardAwardRsp(); message.errno = object.errno ?? 0; message.moduleid = object.moduleid ?? 0; message.award = object.award ?? false; return message; }, }; function createBaseboxGetAward(): boxGetAward { return { id: 0, select: 0, type: 0, num: 0 }; } export const boxGetAward = { fromJSON(object: any): boxGetAward { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0, select: isSet(object.select) ? globalThis.Number(object.select) : 0, type: isSet(object.type) ? globalThis.Number(object.type) : 0, num: isSet(object.num) ? globalThis.Number(object.num) : 0, }; }, toJSON(message: boxGetAward): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } if (message.select !== 0) { obj.select = Math.round(message.select); } if (message.type !== 0) { obj.type = Math.round(message.type); } if (message.num !== 0) { obj.num = Math.round(message.num); } return obj; }, create, I>>(base?: I): boxGetAward { return boxGetAward.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): boxGetAward { const message = createBaseboxGetAward(); message.id = object.id ?? 0; message.select = object.select ?? 0; message.type = object.type ?? 0; message.num = object.num ?? 0; return message; }, }; function createBaseboxGetAwardRsp(): boxGetAwardRsp { return { errno: 0, type: 0 }; } export const boxGetAwardRsp = { fromJSON(object: any): boxGetAwardRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, type: isSet(object.type) ? globalThis.Number(object.type) : 0, }; }, toJSON(message: boxGetAwardRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.type !== 0) { obj.type = Math.round(message.type); } return obj; }, create, I>>(base?: I): boxGetAwardRsp { return boxGetAwardRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): boxGetAwardRsp { const message = createBaseboxGetAwardRsp(); message.errno = object.errno ?? 0; message.type = object.type ?? 0; return message; }, }; function createBasefirstRechargeData(): firstRechargeData { return { moduleid: 0 }; } export const firstRechargeData = { fromJSON(object: any): firstRechargeData { return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 }; }, toJSON(message: firstRechargeData): unknown { const obj: any = {}; if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): firstRechargeData { return firstRechargeData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): firstRechargeData { const message = createBasefirstRechargeData(); message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasefirstRechargeDataRsp(): firstRechargeDataRsp { return { errno: 0, moduleid: 0, state: false, day: 0, award: 0 }; } export const firstRechargeDataRsp = { fromJSON(object: any): firstRechargeDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, state: isSet(object.state) ? globalThis.Boolean(object.state) : false, day: isSet(object.day) ? globalThis.Number(object.day) : 0, award: isSet(object.award) ? globalThis.Number(object.award) : 0, }; }, toJSON(message: firstRechargeDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } if (message.state !== false) { obj.state = message.state; } if (message.day !== 0) { obj.day = Math.round(message.day); } if (message.award !== 0) { obj.award = Math.round(message.award); } return obj; }, create, I>>(base?: I): firstRechargeDataRsp { return firstRechargeDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): firstRechargeDataRsp { const message = createBasefirstRechargeDataRsp(); message.errno = object.errno ?? 0; message.moduleid = object.moduleid ?? 0; message.state = object.state ?? false; message.day = object.day ?? 0; message.award = object.award ?? 0; return message; }, }; function createBasefirstRechargeBuy(): firstRechargeBuy { return { moduleid: 0 }; } export const firstRechargeBuy = { fromJSON(object: any): firstRechargeBuy { return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 }; }, toJSON(message: firstRechargeBuy): unknown { const obj: any = {}; if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): firstRechargeBuy { return firstRechargeBuy.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): firstRechargeBuy { const message = createBasefirstRechargeBuy(); message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasefirstRechargeBuyRsp(): firstRechargeBuyRsp { return { errno: 0, moduleid: 0 }; } export const firstRechargeBuyRsp = { fromJSON(object: any): firstRechargeBuyRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, }; }, toJSON(message: firstRechargeBuyRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): firstRechargeBuyRsp { return firstRechargeBuyRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): firstRechargeBuyRsp { const message = createBasefirstRechargeBuyRsp(); message.errno = object.errno ?? 0; message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasefirstRechargeAward(): firstRechargeAward { return { moduleid: 0, day: 0 }; } export const firstRechargeAward = { fromJSON(object: any): firstRechargeAward { return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, day: isSet(object.day) ? globalThis.Number(object.day) : 0, }; }, toJSON(message: firstRechargeAward): unknown { const obj: any = {}; if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } if (message.day !== 0) { obj.day = Math.round(message.day); } return obj; }, create, I>>(base?: I): firstRechargeAward { return firstRechargeAward.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): firstRechargeAward { const message = createBasefirstRechargeAward(); message.moduleid = object.moduleid ?? 0; message.day = object.day ?? 0; return message; }, }; function createBasefirstRechargeAwardRsp(): firstRechargeAwardRsp { return { errno: 0, moduleid: 0, award: 0 }; } export const firstRechargeAwardRsp = { fromJSON(object: any): firstRechargeAwardRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, award: isSet(object.award) ? globalThis.Number(object.award) : 0, }; }, toJSON(message: firstRechargeAwardRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } if (message.award !== 0) { obj.award = Math.round(message.award); } return obj; }, create, I>>(base?: I): firstRechargeAwardRsp { return firstRechargeAwardRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): firstRechargeAwardRsp { const message = createBasefirstRechargeAwardRsp(); message.errno = object.errno ?? 0; message.moduleid = object.moduleid ?? 0; message.award = object.award ?? 0; return message; }, }; function createBasefirstRechargeNty(): firstRechargeNty { return { moduleid: 0, state: false, day: 0, award: 0 }; } export const firstRechargeNty = { fromJSON(object: any): firstRechargeNty { return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, state: isSet(object.state) ? globalThis.Boolean(object.state) : false, day: isSet(object.day) ? globalThis.Number(object.day) : 0, award: isSet(object.award) ? globalThis.Number(object.award) : 0, }; }, toJSON(message: firstRechargeNty): unknown { const obj: any = {}; if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } if (message.state !== false) { obj.state = message.state; } if (message.day !== 0) { obj.day = Math.round(message.day); } if (message.award !== 0) { obj.award = Math.round(message.award); } return obj; }, create, I>>(base?: I): firstRechargeNty { return firstRechargeNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): firstRechargeNty { const message = createBasefirstRechargeNty(); message.moduleid = object.moduleid ?? 0; message.state = object.state ?? false; message.day = object.day ?? 0; message.award = object.award ?? 0; return message; }, }; function createBasedailyDungeonsData(): dailyDungeonsData { return {}; } export const dailyDungeonsData = { fromJSON(_: any): dailyDungeonsData { return {}; }, toJSON(_: dailyDungeonsData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): dailyDungeonsData { return dailyDungeonsData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): dailyDungeonsData { const message = createBasedailyDungeonsData(); return message; }, }; function createBasedailyDungeonsDataRsp(): dailyDungeonsDataRsp { return { errno: 0, list: [] }; } export const dailyDungeonsDataRsp = { fromJSON(object: any): dailyDungeonsDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => dailyDungeonsInfo.fromJSON(e)) : [], }; }, toJSON(message: dailyDungeonsDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => dailyDungeonsInfo.toJSON(e)); } return obj; }, create, I>>(base?: I): dailyDungeonsDataRsp { return dailyDungeonsDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): dailyDungeonsDataRsp { const message = createBasedailyDungeonsDataRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => dailyDungeonsInfo.fromPartial(e)) || []; return message; }, }; function createBasedailyDungeonsStart(): dailyDungeonsStart { return { type: 0, diff: 0 }; } export const dailyDungeonsStart = { fromJSON(object: any): dailyDungeonsStart { return { type: isSet(object.type) ? globalThis.Number(object.type) : 0, diff: isSet(object.diff) ? globalThis.Number(object.diff) : 0, }; }, toJSON(message: dailyDungeonsStart): unknown { const obj: any = {}; if (message.type !== 0) { obj.type = Math.round(message.type); } if (message.diff !== 0) { obj.diff = Math.round(message.diff); } return obj; }, create, I>>(base?: I): dailyDungeonsStart { return dailyDungeonsStart.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): dailyDungeonsStart { const message = createBasedailyDungeonsStart(); message.type = object.type ?? 0; message.diff = object.diff ?? 0; return message; }, }; function createBasedailyDungeonsStartRsp(): dailyDungeonsStartRsp { return { errno: 0, awardList: [] }; } export const dailyDungeonsStartRsp = { fromJSON(object: any): dailyDungeonsStartRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, awardList: globalThis.Array.isArray(object?.awardList) ? object.awardList.map((e: any) => idNum.fromJSON(e)) : [], }; }, toJSON(message: dailyDungeonsStartRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.awardList?.length) { obj.awardList = message.awardList.map((e) => idNum.toJSON(e)); } return obj; }, create, I>>(base?: I): dailyDungeonsStartRsp { return dailyDungeonsStartRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): dailyDungeonsStartRsp { const message = createBasedailyDungeonsStartRsp(); message.errno = object.errno ?? 0; message.awardList = object.awardList?.map((e) => idNum.fromPartial(e)) || []; return message; }, }; function createBasedailyDungeonsEnd(): dailyDungeonsEnd { return { win: false, monsterNum: 0, bossNum: 0, eliteNum: 0 }; } export const dailyDungeonsEnd = { fromJSON(object: any): dailyDungeonsEnd { return { win: isSet(object.win) ? globalThis.Boolean(object.win) : false, monsterNum: isSet(object.monsterNum) ? globalThis.Number(object.monsterNum) : 0, bossNum: isSet(object.bossNum) ? globalThis.Number(object.bossNum) : 0, eliteNum: isSet(object.eliteNum) ? globalThis.Number(object.eliteNum) : 0, }; }, toJSON(message: dailyDungeonsEnd): unknown { const obj: any = {}; if (message.win !== false) { obj.win = message.win; } if (message.monsterNum !== 0) { obj.monsterNum = Math.round(message.monsterNum); } if (message.bossNum !== 0) { obj.bossNum = Math.round(message.bossNum); } if (message.eliteNum !== 0) { obj.eliteNum = Math.round(message.eliteNum); } return obj; }, create, I>>(base?: I): dailyDungeonsEnd { return dailyDungeonsEnd.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): dailyDungeonsEnd { const message = createBasedailyDungeonsEnd(); message.win = object.win ?? false; message.monsterNum = object.monsterNum ?? 0; message.bossNum = object.bossNum ?? 0; message.eliteNum = object.eliteNum ?? 0; return message; }, }; function createBasedailyDungeonsEndRsp(): dailyDungeonsEndRsp { return { errno: 0, data: undefined }; } export const dailyDungeonsEndRsp = { fromJSON(object: any): dailyDungeonsEndRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? dailyDungeonsInfo.fromJSON(object.data) : undefined, }; }, toJSON(message: dailyDungeonsEndRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = dailyDungeonsInfo.toJSON(message.data); } return obj; }, create, I>>(base?: I): dailyDungeonsEndRsp { return dailyDungeonsEndRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): dailyDungeonsEndRsp { const message = createBasedailyDungeonsEndRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? dailyDungeonsInfo.fromPartial(object.data) : undefined; return message; }, }; function createBasedailyDungeonsSweep(): dailyDungeonsSweep { return { type: 0, diff: 0 }; } export const dailyDungeonsSweep = { fromJSON(object: any): dailyDungeonsSweep { return { type: isSet(object.type) ? globalThis.Number(object.type) : 0, diff: isSet(object.diff) ? globalThis.Number(object.diff) : 0, }; }, toJSON(message: dailyDungeonsSweep): unknown { const obj: any = {}; if (message.type !== 0) { obj.type = Math.round(message.type); } if (message.diff !== 0) { obj.diff = Math.round(message.diff); } return obj; }, create, I>>(base?: I): dailyDungeonsSweep { return dailyDungeonsSweep.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): dailyDungeonsSweep { const message = createBasedailyDungeonsSweep(); message.type = object.type ?? 0; message.diff = object.diff ?? 0; return message; }, }; function createBasedailyDungeonsSweepRsp(): dailyDungeonsSweepRsp { return { errno: 0, data: undefined }; } export const dailyDungeonsSweepRsp = { fromJSON(object: any): dailyDungeonsSweepRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? dailyDungeonsInfo.fromJSON(object.data) : undefined, }; }, toJSON(message: dailyDungeonsSweepRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = dailyDungeonsInfo.toJSON(message.data); } return obj; }, create, I>>(base?: I): dailyDungeonsSweepRsp { return dailyDungeonsSweepRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): dailyDungeonsSweepRsp { const message = createBasedailyDungeonsSweepRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? dailyDungeonsInfo.fromPartial(object.data) : undefined; return message; }, }; function createBaseadvGiftData(): advGiftData { return {}; } export const advGiftData = { fromJSON(_: any): advGiftData { return {}; }, toJSON(_: advGiftData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): advGiftData { return advGiftData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): advGiftData { const message = createBaseadvGiftData(); return message; }, }; function createBaseadvGiftDataRsp(): advGiftDataRsp { return { errno: 0 }; } export const advGiftDataRsp = { fromJSON(object: any): advGiftDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: advGiftDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): advGiftDataRsp { return advGiftDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): advGiftDataRsp { const message = createBaseadvGiftDataRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaseadvGiftBuy(): advGiftBuy { return { id: 0 }; } export const advGiftBuy = { fromJSON(object: any): advGiftBuy { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 }; }, toJSON(message: advGiftBuy): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): advGiftBuy { return advGiftBuy.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): advGiftBuy { const message = createBaseadvGiftBuy(); message.id = object.id ?? 0; return message; }, }; function createBaseadvGiftBuyRsp(): advGiftBuyRsp { return { errno: 0 }; } export const advGiftBuyRsp = { fromJSON(object: any): advGiftBuyRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: advGiftBuyRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): advGiftBuyRsp { return advGiftBuyRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): advGiftBuyRsp { const message = createBaseadvGiftBuyRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaseadvGiftNty(): advGiftNty { return { list: [] }; } export const advGiftNty = { fromJSON(object: any): advGiftNty { return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => idNum.fromJSON(e)) : [] }; }, toJSON(message: advGiftNty): unknown { const obj: any = {}; if (message.list?.length) { obj.list = message.list.map((e) => idNum.toJSON(e)); } return obj; }, create, I>>(base?: I): advGiftNty { return advGiftNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): advGiftNty { const message = createBaseadvGiftNty(); message.list = object.list?.map((e) => idNum.fromPartial(e)) || []; return message; }, }; function createBasepopGiftData(): popGiftData { return {}; } export const popGiftData = { fromJSON(_: any): popGiftData { return {}; }, toJSON(_: popGiftData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): popGiftData { return popGiftData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): popGiftData { const message = createBasepopGiftData(); return message; }, }; function createBasepopGiftDataRsp(): popGiftDataRsp { return { errno: 0, list: [] }; } export const popGiftDataRsp = { fromJSON(object: any): popGiftDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => popGiftInfo.fromJSON(e)) : [], }; }, toJSON(message: popGiftDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => popGiftInfo.toJSON(e)); } return obj; }, create, I>>(base?: I): popGiftDataRsp { return popGiftDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): popGiftDataRsp { const message = createBasepopGiftDataRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => popGiftInfo.fromPartial(e)) || []; return message; }, }; function createBasepopGiftBuy(): popGiftBuy { return { id: 0 }; } export const popGiftBuy = { fromJSON(object: any): popGiftBuy { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 }; }, toJSON(message: popGiftBuy): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): popGiftBuy { return popGiftBuy.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): popGiftBuy { const message = createBasepopGiftBuy(); message.id = object.id ?? 0; return message; }, }; function createBasepopGiftBuyRsp(): popGiftBuyRsp { return { errno: 0 }; } export const popGiftBuyRsp = { fromJSON(object: any): popGiftBuyRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: popGiftBuyRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): popGiftBuyRsp { return popGiftBuyRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): popGiftBuyRsp { const message = createBasepopGiftBuyRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBasepopGiftNty(): popGiftNty { return { data: undefined }; } export const popGiftNty = { fromJSON(object: any): popGiftNty { return { data: isSet(object.data) ? popGiftInfo.fromJSON(object.data) : undefined }; }, toJSON(message: popGiftNty): unknown { const obj: any = {}; if (message.data !== undefined) { obj.data = popGiftInfo.toJSON(message.data); } return obj; }, create, I>>(base?: I): popGiftNty { return popGiftNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): popGiftNty { const message = createBasepopGiftNty(); message.data = (object.data !== undefined && object.data !== null) ? popGiftInfo.fromPartial(object.data) : undefined; return message; }, }; function createBasepopGiftChangeNty(): popGiftChangeNty { return { data: undefined }; } export const popGiftChangeNty = { fromJSON(object: any): popGiftChangeNty { return { data: isSet(object.data) ? popGiftInfo.fromJSON(object.data) : undefined }; }, toJSON(message: popGiftChangeNty): unknown { const obj: any = {}; if (message.data !== undefined) { obj.data = popGiftInfo.toJSON(message.data); } return obj; }, create, I>>(base?: I): popGiftChangeNty { return popGiftChangeNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): popGiftChangeNty { const message = createBasepopGiftChangeNty(); message.data = (object.data !== undefined && object.data !== null) ? popGiftInfo.fromPartial(object.data) : undefined; return message; }, }; function createBasefundData(): fundData { return { moduleid: 0 }; } export const fundData = { fromJSON(object: any): fundData { return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 }; }, toJSON(message: fundData): unknown { const obj: any = {}; if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): fundData { return fundData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): fundData { const message = createBasefundData(); message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasefundDataRsp(): fundDataRsp { return { errno: 0, moduleid: 0, state: false, award: 0, freeAward: 0, progress: 0 }; } export const fundDataRsp = { fromJSON(object: any): fundDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, state: isSet(object.state) ? globalThis.Boolean(object.state) : false, award: isSet(object.award) ? globalThis.Number(object.award) : 0, freeAward: isSet(object.freeAward) ? globalThis.Number(object.freeAward) : 0, progress: isSet(object.progress) ? globalThis.Number(object.progress) : 0, }; }, toJSON(message: fundDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } if (message.state !== false) { obj.state = message.state; } if (message.award !== 0) { obj.award = Math.round(message.award); } if (message.freeAward !== 0) { obj.freeAward = Math.round(message.freeAward); } if (message.progress !== 0) { obj.progress = Math.round(message.progress); } return obj; }, create, I>>(base?: I): fundDataRsp { return fundDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): fundDataRsp { const message = createBasefundDataRsp(); message.errno = object.errno ?? 0; message.moduleid = object.moduleid ?? 0; message.state = object.state ?? false; message.award = object.award ?? 0; message.freeAward = object.freeAward ?? 0; message.progress = object.progress ?? 0; return message; }, }; function createBasefundBuy(): fundBuy { return { moduleid: 0 }; } export const fundBuy = { fromJSON(object: any): fundBuy { return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 }; }, toJSON(message: fundBuy): unknown { const obj: any = {}; if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): fundBuy { return fundBuy.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): fundBuy { const message = createBasefundBuy(); message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasefundBuyRsp(): fundBuyRsp { return { errno: 0, moduleid: 0 }; } export const fundBuyRsp = { fromJSON(object: any): fundBuyRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, }; }, toJSON(message: fundBuyRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): fundBuyRsp { return fundBuyRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): fundBuyRsp { const message = createBasefundBuyRsp(); message.errno = object.errno ?? 0; message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasefundAward(): fundAward { return { moduleid: 0 }; } export const fundAward = { fromJSON(object: any): fundAward { return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 }; }, toJSON(message: fundAward): unknown { const obj: any = {}; if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } return obj; }, create, I>>(base?: I): fundAward { return fundAward.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): fundAward { const message = createBasefundAward(); message.moduleid = object.moduleid ?? 0; return message; }, }; function createBasefundAwardRsp(): fundAwardRsp { return { errno: 0, moduleid: 0, award: 0, freeAward: 0 }; } export const fundAwardRsp = { fromJSON(object: any): fundAwardRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, award: isSet(object.award) ? globalThis.Number(object.award) : 0, freeAward: isSet(object.freeAward) ? globalThis.Number(object.freeAward) : 0, }; }, toJSON(message: fundAwardRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } if (message.award !== 0) { obj.award = Math.round(message.award); } if (message.freeAward !== 0) { obj.freeAward = Math.round(message.freeAward); } return obj; }, create, I>>(base?: I): fundAwardRsp { return fundAwardRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): fundAwardRsp { const message = createBasefundAwardRsp(); message.errno = object.errno ?? 0; message.moduleid = object.moduleid ?? 0; message.award = object.award ?? 0; message.freeAward = object.freeAward ?? 0; return message; }, }; function createBasefundNty(): fundNty { return { moduleid: 0, state: false, award: 0, freeAward: 0, progress: 0 }; } export const fundNty = { fromJSON(object: any): fundNty { return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0, state: isSet(object.state) ? globalThis.Boolean(object.state) : false, award: isSet(object.award) ? globalThis.Number(object.award) : 0, freeAward: isSet(object.freeAward) ? globalThis.Number(object.freeAward) : 0, progress: isSet(object.progress) ? globalThis.Number(object.progress) : 0, }; }, toJSON(message: fundNty): unknown { const obj: any = {}; if (message.moduleid !== 0) { obj.moduleid = Math.round(message.moduleid); } if (message.state !== false) { obj.state = message.state; } if (message.award !== 0) { obj.award = Math.round(message.award); } if (message.freeAward !== 0) { obj.freeAward = Math.round(message.freeAward); } if (message.progress !== 0) { obj.progress = Math.round(message.progress); } return obj; }, create, I>>(base?: I): fundNty { return fundNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): fundNty { const message = createBasefundNty(); message.moduleid = object.moduleid ?? 0; message.state = object.state ?? false; message.award = object.award ?? 0; message.freeAward = object.freeAward ?? 0; message.progress = object.progress ?? 0; return message; }, }; function createBasekeepRechargeData(): keepRechargeData { return {}; } export const keepRechargeData = { fromJSON(_: any): keepRechargeData { return {}; }, toJSON(_: keepRechargeData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): keepRechargeData { return keepRechargeData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): keepRechargeData { const message = createBasekeepRechargeData(); return message; }, }; function createBasekeepRechargeDataRsp(): keepRechargeDataRsp { return { errno: 0, day: 0, num: 0, award: 0 }; } export const keepRechargeDataRsp = { fromJSON(object: any): keepRechargeDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, day: isSet(object.day) ? globalThis.Number(object.day) : 0, num: isSet(object.num) ? globalThis.Number(object.num) : 0, award: isSet(object.award) ? globalThis.Number(object.award) : 0, }; }, toJSON(message: keepRechargeDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.day !== 0) { obj.day = Math.round(message.day); } if (message.num !== 0) { obj.num = Math.round(message.num); } if (message.award !== 0) { obj.award = Math.round(message.award); } return obj; }, create, I>>(base?: I): keepRechargeDataRsp { return keepRechargeDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): keepRechargeDataRsp { const message = createBasekeepRechargeDataRsp(); message.errno = object.errno ?? 0; message.day = object.day ?? 0; message.num = object.num ?? 0; message.award = object.award ?? 0; return message; }, }; function createBasekeepRechargeAward(): keepRechargeAward { return { day: 0 }; } export const keepRechargeAward = { fromJSON(object: any): keepRechargeAward { return { day: isSet(object.day) ? globalThis.Number(object.day) : 0 }; }, toJSON(message: keepRechargeAward): unknown { const obj: any = {}; if (message.day !== 0) { obj.day = Math.round(message.day); } return obj; }, create, I>>(base?: I): keepRechargeAward { return keepRechargeAward.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): keepRechargeAward { const message = createBasekeepRechargeAward(); message.day = object.day ?? 0; return message; }, }; function createBasekeepRechargeAwardRsp(): keepRechargeAwardRsp { return { errno: 0, award: 0 }; } export const keepRechargeAwardRsp = { fromJSON(object: any): keepRechargeAwardRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, award: isSet(object.award) ? globalThis.Number(object.award) : 0, }; }, toJSON(message: keepRechargeAwardRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.award !== 0) { obj.award = Math.round(message.award); } return obj; }, create, I>>(base?: I): keepRechargeAwardRsp { return keepRechargeAwardRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): keepRechargeAwardRsp { const message = createBasekeepRechargeAwardRsp(); message.errno = object.errno ?? 0; message.award = object.award ?? 0; return message; }, }; function createBasegetRedPointList(): getRedPointList { return {}; } export const getRedPointList = { fromJSON(_: any): getRedPointList { return {}; }, toJSON(_: getRedPointList): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): getRedPointList { return getRedPointList.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): getRedPointList { const message = createBasegetRedPointList(); return message; }, }; function createBasegetRedPointListRsp(): getRedPointListRsp { return { errno: 0, list: [] }; } export const getRedPointListRsp = { fromJSON(object: any): getRedPointListRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => redPointInfo.fromJSON(e)) : [], }; }, toJSON(message: getRedPointListRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => redPointInfo.toJSON(e)); } return obj; }, create, I>>(base?: I): getRedPointListRsp { return getRedPointListRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): getRedPointListRsp { const message = createBasegetRedPointListRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => redPointInfo.fromPartial(e)) || []; return message; }, }; function createBaserechargeResult(): rechargeResult { return { orderId: "", payOrderId: "", purchaseToken: "", payType: "", cfgId: 0 }; } export const rechargeResult = { fromJSON(object: any): rechargeResult { return { orderId: isSet(object.orderId) ? globalThis.String(object.orderId) : "", payOrderId: isSet(object.payOrderId) ? globalThis.String(object.payOrderId) : "", purchaseToken: isSet(object.purchaseToken) ? globalThis.String(object.purchaseToken) : "", payType: isSet(object.payType) ? globalThis.String(object.payType) : "", cfgId: isSet(object.cfgId) ? globalThis.Number(object.cfgId) : 0, }; }, toJSON(message: rechargeResult): unknown { const obj: any = {}; if (message.orderId !== "") { obj.orderId = message.orderId; } if (message.payOrderId !== "") { obj.payOrderId = message.payOrderId; } if (message.purchaseToken !== "") { obj.purchaseToken = message.purchaseToken; } if (message.payType !== "") { obj.payType = message.payType; } if (message.cfgId !== 0) { obj.cfgId = Math.round(message.cfgId); } return obj; }, create, I>>(base?: I): rechargeResult { return rechargeResult.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): rechargeResult { const message = createBaserechargeResult(); message.orderId = object.orderId ?? ""; message.payOrderId = object.payOrderId ?? ""; message.purchaseToken = object.purchaseToken ?? ""; message.payType = object.payType ?? ""; message.cfgId = object.cfgId ?? 0; return message; }, }; function createBaserechargeResultRsp(): rechargeResultRsp { return { errno: 0 }; } export const rechargeResultRsp = { fromJSON(object: any): rechargeResultRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: rechargeResultRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): rechargeResultRsp { return rechargeResultRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): rechargeResultRsp { const message = createBaserechargeResultRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaseonlineAwardGetAward(): onlineAwardGetAward { return { pos: 0 }; } export const onlineAwardGetAward = { fromJSON(object: any): onlineAwardGetAward { return { pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0 }; }, toJSON(message: onlineAwardGetAward): unknown { const obj: any = {}; if (message.pos !== 0) { obj.pos = Math.round(message.pos); } return obj; }, create, I>>(base?: I): onlineAwardGetAward { return onlineAwardGetAward.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): onlineAwardGetAward { const message = createBaseonlineAwardGetAward(); message.pos = object.pos ?? 0; return message; }, }; function createBaseonlineAwardGetAwardRsp(): onlineAwardGetAwardRsp { return { errno: 0, award: 0 }; } export const onlineAwardGetAwardRsp = { fromJSON(object: any): onlineAwardGetAwardRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, award: isSet(object.award) ? globalThis.Number(object.award) : 0, }; }, toJSON(message: onlineAwardGetAwardRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.award !== 0) { obj.award = Math.round(message.award); } return obj; }, create, I>>(base?: I): onlineAwardGetAwardRsp { return onlineAwardGetAwardRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): onlineAwardGetAwardRsp { const message = createBaseonlineAwardGetAwardRsp(); message.errno = object.errno ?? 0; message.award = object.award ?? 0; return message; }, }; function createBaseonlineAwardGetData(): onlineAwardGetData { return {}; } export const onlineAwardGetData = { fromJSON(_: any): onlineAwardGetData { return {}; }, toJSON(_: onlineAwardGetData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): onlineAwardGetData { return onlineAwardGetData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): onlineAwardGetData { const message = createBaseonlineAwardGetData(); return message; }, }; function createBaseonlineAwardGetDataRsp(): onlineAwardGetDataRsp { return { errno: 0 }; } export const onlineAwardGetDataRsp = { fromJSON(object: any): onlineAwardGetDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: onlineAwardGetDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): onlineAwardGetDataRsp { return onlineAwardGetDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): onlineAwardGetDataRsp { const message = createBaseonlineAwardGetDataRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaseonlineAwardNty(): onlineAwardNty { return { open: false, time: 0, award: 0 }; } export const onlineAwardNty = { fromJSON(object: any): onlineAwardNty { return { open: isSet(object.open) ? globalThis.Boolean(object.open) : false, time: isSet(object.time) ? globalThis.Number(object.time) : 0, award: isSet(object.award) ? globalThis.Number(object.award) : 0, }; }, toJSON(message: onlineAwardNty): unknown { const obj: any = {}; if (message.open !== false) { obj.open = message.open; } if (message.time !== 0) { obj.time = Math.round(message.time); } if (message.award !== 0) { obj.award = Math.round(message.award); } return obj; }, create, I>>(base?: I): onlineAwardNty { return onlineAwardNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): onlineAwardNty { const message = createBaseonlineAwardNty(); message.open = object.open ?? false; message.time = object.time ?? 0; message.award = object.award ?? 0; return message; }, }; function createBasespeedUpData(): speedUpData { return {}; } export const speedUpData = { fromJSON(_: any): speedUpData { return {}; }, toJSON(_: speedUpData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): speedUpData { return speedUpData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): speedUpData { const message = createBasespeedUpData(); return message; }, }; function createBasespeedUpDataRsp(): speedUpDataRsp { return { errno: 0, time: 0 }; } export const speedUpDataRsp = { fromJSON(object: any): speedUpDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, time: isSet(object.time) ? globalThis.Number(object.time) : 0, }; }, toJSON(message: speedUpDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.time !== 0) { obj.time = Math.round(message.time); } return obj; }, create, I>>(base?: I): speedUpDataRsp { return speedUpDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): speedUpDataRsp { const message = createBasespeedUpDataRsp(); message.errno = object.errno ?? 0; message.time = object.time ?? 0; return message; }, }; function createBasespeedUpBuy(): speedUpBuy { return { free: false }; } export const speedUpBuy = { fromJSON(object: any): speedUpBuy { return { free: isSet(object.free) ? globalThis.Boolean(object.free) : false }; }, toJSON(message: speedUpBuy): unknown { const obj: any = {}; if (message.free !== false) { obj.free = message.free; } return obj; }, create, I>>(base?: I): speedUpBuy { return speedUpBuy.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): speedUpBuy { const message = createBasespeedUpBuy(); message.free = object.free ?? false; return message; }, }; function createBasespeedUpBuyRsp(): speedUpBuyRsp { return { errno: 0, time: 0 }; } export const speedUpBuyRsp = { fromJSON(object: any): speedUpBuyRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, time: isSet(object.time) ? globalThis.Number(object.time) : 0, }; }, toJSON(message: speedUpBuyRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.time !== 0) { obj.time = Math.round(message.time); } return obj; }, create, I>>(base?: I): speedUpBuyRsp { return speedUpBuyRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): speedUpBuyRsp { const message = createBasespeedUpBuyRsp(); message.errno = object.errno ?? 0; message.time = object.time ?? 0; return message; }, }; function createBasecitySkillUpgrade(): citySkillUpgrade { return { id: 0 }; } export const citySkillUpgrade = { fromJSON(object: any): citySkillUpgrade { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 }; }, toJSON(message: citySkillUpgrade): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): citySkillUpgrade { return citySkillUpgrade.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): citySkillUpgrade { const message = createBasecitySkillUpgrade(); message.id = object.id ?? 0; return message; }, }; function createBasecitySkillUpgradeRsp(): citySkillUpgradeRsp { return { errno: 0, id: 0 }; } export const citySkillUpgradeRsp = { fromJSON(object: any): citySkillUpgradeRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, id: isSet(object.id) ? globalThis.Number(object.id) : 0, }; }, toJSON(message: citySkillUpgradeRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): citySkillUpgradeRsp { return citySkillUpgradeRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): citySkillUpgradeRsp { const message = createBasecitySkillUpgradeRsp(); message.errno = object.errno ?? 0; message.id = object.id ?? 0; return message; }, }; function createBasecitySkillBattle(): citySkillBattle { return { id: 0 }; } export const citySkillBattle = { fromJSON(object: any): citySkillBattle { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 }; }, toJSON(message: citySkillBattle): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): citySkillBattle { return citySkillBattle.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): citySkillBattle { const message = createBasecitySkillBattle(); message.id = object.id ?? 0; return message; }, }; function createBasecitySkillBattleRsp(): citySkillBattleRsp { return { errno: 0, id: 0 }; } export const citySkillBattleRsp = { fromJSON(object: any): citySkillBattleRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, id: isSet(object.id) ? globalThis.Number(object.id) : 0, }; }, toJSON(message: citySkillBattleRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): citySkillBattleRsp { return citySkillBattleRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): citySkillBattleRsp { const message = createBasecitySkillBattleRsp(); message.errno = object.errno ?? 0; message.id = object.id ?? 0; return message; }, }; function createBasebuildingExplore(): buildingExplore { return { id: 0 }; } export const buildingExplore = { fromJSON(object: any): buildingExplore { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 }; }, toJSON(message: buildingExplore): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): buildingExplore { return buildingExplore.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): buildingExplore { const message = createBasebuildingExplore(); message.id = object.id ?? 0; return message; }, }; function createBasebuildingExploreRsp(): buildingExploreRsp { return { errno: 0, data: undefined }; } export const buildingExploreRsp = { fromJSON(object: any): buildingExploreRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? building.fromJSON(object.data) : undefined, }; }, toJSON(message: buildingExploreRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = building.toJSON(message.data); } return obj; }, create, I>>(base?: I): buildingExploreRsp { return buildingExploreRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): buildingExploreRsp { const message = createBasebuildingExploreRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? building.fromPartial(object.data) : undefined; return message; }, }; function createBasebuildingAutoExploreAward(): buildingAutoExploreAward { return { id: 0 }; } export const buildingAutoExploreAward = { fromJSON(object: any): buildingAutoExploreAward { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 }; }, toJSON(message: buildingAutoExploreAward): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): buildingAutoExploreAward { return buildingAutoExploreAward.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): buildingAutoExploreAward { const message = createBasebuildingAutoExploreAward(); message.id = object.id ?? 0; return message; }, }; function createBasebuildingAutoExploreAwardRsp(): buildingAutoExploreAwardRsp { return { errno: 0, data: undefined }; } export const buildingAutoExploreAwardRsp = { fromJSON(object: any): buildingAutoExploreAwardRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? building.fromJSON(object.data) : undefined, }; }, toJSON(message: buildingAutoExploreAwardRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = building.toJSON(message.data); } return obj; }, create, I>>(base?: I): buildingAutoExploreAwardRsp { return buildingAutoExploreAwardRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): buildingAutoExploreAwardRsp { const message = createBasebuildingAutoExploreAwardRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? building.fromPartial(object.data) : undefined; return message; }, }; function createBasebuildingExploreBattle(): buildingExploreBattle { return { id: 0, list: [] }; } export const buildingExploreBattle = { fromJSON(object: any): buildingExploreBattle { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [], }; }, toJSON(message: buildingExploreBattle): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } if (message.list?.length) { obj.list = message.list; } return obj; }, create, I>>(base?: I): buildingExploreBattle { return buildingExploreBattle.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): buildingExploreBattle { const message = createBasebuildingExploreBattle(); message.id = object.id ?? 0; message.list = object.list?.map((e) => e) || []; return message; }, }; function createBasebuildingExploreBattleRsp(): buildingExploreBattleRsp { return { errno: 0, data: undefined }; } export const buildingExploreBattleRsp = { fromJSON(object: any): buildingExploreBattleRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? building.fromJSON(object.data) : undefined, }; }, toJSON(message: buildingExploreBattleRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = building.toJSON(message.data); } return obj; }, create, I>>(base?: I): buildingExploreBattleRsp { return buildingExploreBattleRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): buildingExploreBattleRsp { const message = createBasebuildingExploreBattleRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? building.fromPartial(object.data) : undefined; return message; }, }; function createBasebuildingAutoExploreOption(): buildingAutoExploreOption { return { id: 0, open: false }; } export const buildingAutoExploreOption = { fromJSON(object: any): buildingAutoExploreOption { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0, open: isSet(object.open) ? globalThis.Boolean(object.open) : false, }; }, toJSON(message: buildingAutoExploreOption): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } if (message.open !== false) { obj.open = message.open; } return obj; }, create, I>>(base?: I): buildingAutoExploreOption { return buildingAutoExploreOption.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): buildingAutoExploreOption { const message = createBasebuildingAutoExploreOption(); message.id = object.id ?? 0; message.open = object.open ?? false; return message; }, }; function createBasebuildingAutoExploreOptionRsp(): buildingAutoExploreOptionRsp { return { errno: 0, data: undefined }; } export const buildingAutoExploreOptionRsp = { fromJSON(object: any): buildingAutoExploreOptionRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, data: isSet(object.data) ? building.fromJSON(object.data) : undefined, }; }, toJSON(message: buildingAutoExploreOptionRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.data !== undefined) { obj.data = building.toJSON(message.data); } return obj; }, create, I>>(base?: I): buildingAutoExploreOptionRsp { return buildingAutoExploreOptionRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): buildingAutoExploreOptionRsp { const message = createBasebuildingAutoExploreOptionRsp(); message.errno = object.errno ?? 0; message.data = (object.data !== undefined && object.data !== null) ? building.fromPartial(object.data) : undefined; return message; }, }; function createBaselevelGiftData(): levelGiftData { return {}; } export const levelGiftData = { fromJSON(_: any): levelGiftData { return {}; }, toJSON(_: levelGiftData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): levelGiftData { return levelGiftData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): levelGiftData { const message = createBaselevelGiftData(); return message; }, }; function createBaselevelGiftDataRsp(): levelGiftDataRsp { return { errno: 0 }; } export const levelGiftDataRsp = { fromJSON(object: any): levelGiftDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: levelGiftDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): levelGiftDataRsp { return levelGiftDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): levelGiftDataRsp { const message = createBaselevelGiftDataRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaselevelGiftBuy(): levelGiftBuy { return { id: 0 }; } export const levelGiftBuy = { fromJSON(object: any): levelGiftBuy { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 }; }, toJSON(message: levelGiftBuy): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): levelGiftBuy { return levelGiftBuy.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): levelGiftBuy { const message = createBaselevelGiftBuy(); message.id = object.id ?? 0; return message; }, }; function createBaselevelGiftBuyRsp(): levelGiftBuyRsp { return { errno: 0 }; } export const levelGiftBuyRsp = { fromJSON(object: any): levelGiftBuyRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: levelGiftBuyRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): levelGiftBuyRsp { return levelGiftBuyRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): levelGiftBuyRsp { const message = createBaselevelGiftBuyRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaselevelGiftNty(): levelGiftNty { return { list: [] }; } export const levelGiftNty = { fromJSON(object: any): levelGiftNty { return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => idNum.fromJSON(e)) : [] }; }, toJSON(message: levelGiftNty): unknown { const obj: any = {}; if (message.list?.length) { obj.list = message.list.map((e) => idNum.toJSON(e)); } return obj; }, create, I>>(base?: I): levelGiftNty { return levelGiftNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): levelGiftNty { const message = createBaselevelGiftNty(); message.list = object.list?.map((e) => idNum.fromPartial(e)) || []; return message; }, }; function createBaselevelGiftDelRedPoint(): levelGiftDelRedPoint { return {}; } export const levelGiftDelRedPoint = { fromJSON(_: any): levelGiftDelRedPoint { return {}; }, toJSON(_: levelGiftDelRedPoint): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): levelGiftDelRedPoint { return levelGiftDelRedPoint.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): levelGiftDelRedPoint { const message = createBaselevelGiftDelRedPoint(); return message; }, }; function createBaselevelGiftDelRedPointRsp(): levelGiftDelRedPointRsp { return { errno: 0 }; } export const levelGiftDelRedPointRsp = { fromJSON(object: any): levelGiftDelRedPointRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: levelGiftDelRedPointRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): levelGiftDelRedPointRsp { return levelGiftDelRedPointRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): levelGiftDelRedPointRsp { const message = createBaselevelGiftDelRedPointRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaselotteryData(): lotteryData { return {}; } export const lotteryData = { fromJSON(_: any): lotteryData { return {}; }, toJSON(_: lotteryData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): lotteryData { return lotteryData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): lotteryData { const message = createBaselotteryData(); return message; }, }; function createBaselotteryDataRsp(): lotteryDataRsp { return { errno: 0 }; } export const lotteryDataRsp = { fromJSON(object: any): lotteryDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: lotteryDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): lotteryDataRsp { return lotteryDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): lotteryDataRsp { const message = createBaselotteryDataRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaselotteryAward(): lotteryAward { return { free: false }; } export const lotteryAward = { fromJSON(object: any): lotteryAward { return { free: isSet(object.free) ? globalThis.Boolean(object.free) : false }; }, toJSON(message: lotteryAward): unknown { const obj: any = {}; if (message.free !== false) { obj.free = message.free; } return obj; }, create, I>>(base?: I): lotteryAward { return lotteryAward.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): lotteryAward { const message = createBaselotteryAward(); message.free = object.free ?? false; return message; }, }; function createBaselotteryAwardRsp(): lotteryAwardRsp { return { errno: 0, free: false, award: 0 }; } export const lotteryAwardRsp = { fromJSON(object: any): lotteryAwardRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, free: isSet(object.free) ? globalThis.Boolean(object.free) : false, award: isSet(object.award) ? globalThis.Number(object.award) : 0, }; }, toJSON(message: lotteryAwardRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.free !== false) { obj.free = message.free; } if (message.award !== 0) { obj.award = Math.round(message.award); } return obj; }, create, I>>(base?: I): lotteryAwardRsp { return lotteryAwardRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): lotteryAwardRsp { const message = createBaselotteryAwardRsp(); message.errno = object.errno ?? 0; message.free = object.free ?? false; message.award = object.award ?? 0; return message; }, }; function createBaselotteryBuy(): lotteryBuy { return {}; } export const lotteryBuy = { fromJSON(_: any): lotteryBuy { return {}; }, toJSON(_: lotteryBuy): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): lotteryBuy { return lotteryBuy.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): lotteryBuy { const message = createBaselotteryBuy(); return message; }, }; function createBaselotteryBuyRsp(): lotteryBuyRsp { return { errno: 0 }; } export const lotteryBuyRsp = { fromJSON(object: any): lotteryBuyRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 }; }, toJSON(message: lotteryBuyRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } return obj; }, create, I>>(base?: I): lotteryBuyRsp { return lotteryBuyRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): lotteryBuyRsp { const message = createBaselotteryBuyRsp(); message.errno = object.errno ?? 0; return message; }, }; function createBaselotteryNty(): lotteryNty { return { state: 0, free: 0, award: 0, day: 0 }; } export const lotteryNty = { fromJSON(object: any): lotteryNty { return { state: isSet(object.state) ? globalThis.Number(object.state) : 0, free: isSet(object.free) ? globalThis.Number(object.free) : 0, award: isSet(object.award) ? globalThis.Number(object.award) : 0, day: isSet(object.day) ? globalThis.Number(object.day) : 0, }; }, toJSON(message: lotteryNty): unknown { const obj: any = {}; if (message.state !== 0) { obj.state = Math.round(message.state); } if (message.free !== 0) { obj.free = Math.round(message.free); } if (message.award !== 0) { obj.award = Math.round(message.award); } if (message.day !== 0) { obj.day = Math.round(message.day); } return obj; }, create, I>>(base?: I): lotteryNty { return lotteryNty.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): lotteryNty { const message = createBaselotteryNty(); message.state = object.state ?? 0; message.free = object.free ?? 0; message.award = object.award ?? 0; message.day = object.day ?? 0; return message; }, }; function createBaseactRankData(): actRankData { return { id: 0 }; } export const actRankData = { fromJSON(object: any): actRankData { return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 }; }, toJSON(message: actRankData): unknown { const obj: any = {}; if (message.id !== 0) { obj.id = Math.round(message.id); } return obj; }, create, I>>(base?: I): actRankData { return actRankData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): actRankData { const message = createBaseactRankData(); message.id = object.id ?? 0; return message; }, }; function createBaseactRankDataRsp(): actRankDataRsp { return { errno: 0, list: [] }; } export const actRankDataRsp = { fromJSON(object: any): actRankDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => rankingInfo.fromJSON(e)) : [], }; }, toJSON(message: actRankDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.list?.length) { obj.list = message.list.map((e) => rankingInfo.toJSON(e)); } return obj; }, create, I>>(base?: I): actRankDataRsp { return actRankDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): actRankDataRsp { const message = createBaseactRankDataRsp(); message.errno = object.errno ?? 0; message.list = object.list?.map((e) => rankingInfo.fromPartial(e)) || []; return message; }, }; function createBasetreasureGetData(): treasureGetData { return {}; } export const treasureGetData = { fromJSON(_: any): treasureGetData { return {}; }, toJSON(_: treasureGetData): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): treasureGetData { return treasureGetData.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): treasureGetData { const message = createBasetreasureGetData(); return message; }, }; function createBasetreasureGetDataRsp(): treasureGetDataRsp { return { errno: 0, buy: 0, sign: 0, list: [], treasure: false }; } export const treasureGetDataRsp = { fromJSON(object: any): treasureGetDataRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, buy: isSet(object.buy) ? globalThis.Number(object.buy) : 0, sign: isSet(object.sign) ? globalThis.Number(object.sign) : 0, list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.Number(e)) : [], treasure: isSet(object.treasure) ? globalThis.Boolean(object.treasure) : false, }; }, toJSON(message: treasureGetDataRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.buy !== 0) { obj.buy = Math.round(message.buy); } if (message.sign !== 0) { obj.sign = Math.round(message.sign); } if (message.list?.length) { obj.list = message.list.map((e) => Math.round(e)); } if (message.treasure !== false) { obj.treasure = message.treasure; } return obj; }, create, I>>(base?: I): treasureGetDataRsp { return treasureGetDataRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): treasureGetDataRsp { const message = createBasetreasureGetDataRsp(); message.errno = object.errno ?? 0; message.buy = object.buy ?? 0; message.sign = object.sign ?? 0; message.list = object.list?.map((e) => e) || []; message.treasure = object.treasure ?? false; return message; }, }; function createBasetreasureDraw(): treasureDraw { return {}; } export const treasureDraw = { fromJSON(_: any): treasureDraw { return {}; }, toJSON(_: treasureDraw): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): treasureDraw { return treasureDraw.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): treasureDraw { const message = createBasetreasureDraw(); return message; }, }; function createBasetreasureDrawRsp(): treasureDrawRsp { return { errno: 0, pos: 0 }; } export const treasureDrawRsp = { fromJSON(object: any): treasureDrawRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0, }; }, toJSON(message: treasureDrawRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.pos !== 0) { obj.pos = Math.round(message.pos); } return obj; }, create, I>>(base?: I): treasureDrawRsp { return treasureDrawRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): treasureDrawRsp { const message = createBasetreasureDrawRsp(); message.errno = object.errno ?? 0; message.pos = object.pos ?? 0; return message; }, }; function createBasetreasureSign(): treasureSign { return {}; } export const treasureSign = { fromJSON(_: any): treasureSign { return {}; }, toJSON(_: treasureSign): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): treasureSign { return treasureSign.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): treasureSign { const message = createBasetreasureSign(); return message; }, }; function createBasetreasureSignRsp(): treasureSignRsp { return { errno: 0, sign: 0 }; } export const treasureSignRsp = { fromJSON(object: any): treasureSignRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, sign: isSet(object.sign) ? globalThis.Number(object.sign) : 0, }; }, toJSON(message: treasureSignRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.sign !== 0) { obj.sign = Math.round(message.sign); } return obj; }, create, I>>(base?: I): treasureSignRsp { return treasureSignRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): treasureSignRsp { const message = createBasetreasureSignRsp(); message.errno = object.errno ?? 0; message.sign = object.sign ?? 0; return message; }, }; function createBasetreasureBuy(): treasureBuy { return {}; } export const treasureBuy = { fromJSON(_: any): treasureBuy { return {}; }, toJSON(_: treasureBuy): unknown { const obj: any = {}; return obj; }, create, I>>(base?: I): treasureBuy { return treasureBuy.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(_: I): treasureBuy { const message = createBasetreasureBuy(); return message; }, }; function createBasetreasureBuyRsp(): treasureBuyRsp { return { errno: 0, buy: 0 }; } export const treasureBuyRsp = { fromJSON(object: any): treasureBuyRsp { return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0, buy: isSet(object.buy) ? globalThis.Number(object.buy) : 0, }; }, toJSON(message: treasureBuyRsp): unknown { const obj: any = {}; if (message.errno !== 0) { obj.errno = Math.round(message.errno); } if (message.buy !== 0) { obj.buy = Math.round(message.buy); } return obj; }, create, I>>(base?: I): treasureBuyRsp { return treasureBuyRsp.fromPartial(base ?? ({} as any)); }, fromPartial, I>>(object: I): treasureBuyRsp { const message = createBasetreasureBuyRsp(); message.errno = object.errno ?? 0; message.buy = object.buy ?? 0; return message; }, }; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial } : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; function isSet(value: any): boolean { return value !== null && value !== undefined; }