diff --git a/dist.rar b/dist.rar index 220232f..94210da 100644 Binary files a/dist.rar and b/dist.rar differ diff --git a/src/pb/proto.js b/src/pb/proto.js index 4fb52d1..0f6f344 100644 --- a/src/pb/proto.js +++ b/src/pb/proto.js @@ -8,6 +8,174 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr go_package: ".;pb" }) .addJSON({ + ChatChannel: { + values: { + World: 0, + Union: 1, + Private: 2, + CrossServer: 3, + System: 4 + } + }, + DBChat: { + fields: { + id: { + type: "string", + id: 1 + }, + channel: { + type: "ChatChannel", + id: 2 + }, + suid: { + type: "string", + id: 3 + }, + ruid: { + type: "string", + id: 4 + }, + groud: { + type: "int32", + id: 5 + }, + areaId: { + type: "int32", + id: 6 + }, + unionId: { + type: "string", + id: 7 + }, + headid: { + type: "int32", + id: 8 + }, + uname: { + type: "string", + id: 9 + }, + content: { + type: "string", + id: 10 + }, + ctime: { + type: "int64", + id: 11 + } + } + }, + ChatMessagePush: { + fields: { + chat: { + type: "DBChat", + id: 1 + } + } + }, + ChatCrossChannelReq: { + fields: {} + }, + ChatCrossChannelResp: { + fields: { + channelId: { + type: "int32", + id: 1 + } + } + }, + ChatChanageChannelReq: { + fields: { + channelId: { + type: "int32", + id: 1 + } + } + }, + ChatChanageChannelResp: { + fields: { + channelId: { + type: "int32", + id: 1 + }, + isSucc: { + type: "bool", + id: 2 + } + } + }, + ChatGetListReq: { + fields: { + channel: { + type: "ChatChannel", + id: 1 + } + } + }, + ChatGetListResp: { + fields: { + chats: { + rule: "repeated", + type: "DBChat", + id: 1 + } + } + }, + ChatSpanGetListReq: { + fields: { + channel: { + type: "ChatChannel", + id: 1 + }, + channelId: { + type: "int32", + id: 2 + } + } + }, + ChatSpanGetListResp: { + fields: { + chats: { + rule: "repeated", + type: "DBChat", + id: 1 + } + } + }, + ChatSendReq: { + fields: { + channel: { + type: "ChatChannel", + id: 1 + }, + targetId: { + type: "string", + id: 2 + }, + content: { + type: "string", + id: 3 + } + } + }, + ChatSendResp: { + fields: {} + }, + ChatSpanSendReq: { + fields: { + channel: { + type: "ChatChannel", + id: 1 + }, + content: { + type: "string", + id: 2 + } + } + }, + ChatSpanSendResp: { + fields: {} + }, UserMessage: { fields: { MainType: { @@ -42,21 +210,25 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr type: "string", id: 3 }, - GatewayServiceId: { + ServiceTag: { type: "string", id: 4 }, - MainType: { + GatewayServiceId: { type: "string", id: 5 }, - SubType: { + MainType: { type: "string", id: 6 }, + SubType: { + type: "string", + id: 7 + }, Message: { type: "google.protobuf.Any", - id: 7 + id: 8 } } }, @@ -165,13 +337,25 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr }, NoticeUserCloseReq: { fields: { - UserSessionId: { + Ip: { type: "string", id: 1 }, - UserId: { + UserSessionId: { type: "string", id: 2 + }, + UserId: { + type: "string", + id: 3 + }, + ServiceTag: { + type: "string", + id: 4 + }, + GatewayServiceId: { + type: "string", + id: 5 } } }, @@ -236,6 +420,8 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr DiamondNoEnough: 1004, RoleCreated: 1005, NameExist: 1006, + VeriCodeNoValid: 1007, + VeriCodeExpired: 1008, FriendNotSelf: 1100, FriendSelfMax: 1101, FriendTargetMax: 1102, @@ -266,17 +452,27 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr HeroEquipUpdate: 1311, HeroMaxAwaken: 1312, HeroIsLock: 1313, + HeroMaxCount: 1314, + HeroCostTypeErr: 1315, + HeroStarErr: 1316, + HeroTypeErr: 1317, + HeroExpTypeErr: 1318, + HeroAddMaxExp: 1319, + HeroStarLvErr: 1320, + HeroMaxStarLv: 1321, EquipmentOnFoundEquipment: 1400, EquipmentLvlimitReached: 1401, - StoryNotFindChapter: 1500, - StoryIDFailed: 1501, + MainlineNotFindChapter: 1500, + MainlineIDFailed: 1501, TaskInit: 1600, TaskReset: 1601, TaskHandle: 1602, TaskReceived: 1603, - TaskActiveInit: 1606, - TaskActiveNofound: 1604, - TaskActiveNoenough: 1605 + TaskActiveInit: 1604, + TaskActiveNofound: 1605, + TaskActiveNoenough: 1606, + TaskNoFinished: 1607, + TaskFinished: 1608 } }, google: { @@ -380,6 +576,15 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr } } }, + EquipmentChangePush: { + fields: { + Equipments: { + rule: "repeated", + type: "DB_Equipment", + id: 1 + } + } + }, EquipmentEquipReq: { fields: { HeroCardId: { @@ -765,60 +970,56 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr type: "int32", id: 11 }, - formation: { + cardType: { type: "int32", id: 12 }, - cardType: { - type: "int32", - id: 13 - }, curSkin: { type: "int32", - id: 14 + id: 13 }, skins: { rule: "repeated", type: "int32", - id: 15 + id: 14 }, block: { type: "bool", - id: 16 + id: 15 }, equipID: { rule: "repeated", type: "string", - id: 17 + id: 16 }, resonateNum: { type: "int32", - id: 18 + id: 17 }, distributionResonate: { type: "int32", - id: 19 + id: 18 }, energy: { keyType: "int32", type: "int32", - id: 20 + id: 19 }, sameCount: { type: "int32", - id: 21 + id: 20 }, suiteId: { type: "int32", - id: 22 + id: 21 }, suiteExtId: { type: "int32", - id: 23 + id: 22 }, isOverlying: { type: "bool", - id: 24 + id: 23 } } }, @@ -868,13 +1069,10 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr type: "string", id: 1 }, - expCardID: { - type: "string", - id: 2 - }, - amount: { + expCards: { + keyType: "string", type: "int32", - id: 3 + id: 2 } } }, @@ -1051,7 +1249,7 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr } } }, - HeroProperty: { + HeroPropertyPush: { fields: { heroId: { type: "string", @@ -1085,6 +1283,72 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr } } }, + HeroAddNewHeroPush: { + fields: { + hero: { + type: "DBHero", + id: 1 + }, + count: { + type: "int32", + id: 2 + } + } + }, + HeroGetSpecifiedReq: { + fields: { + heroCoinfigID: { + type: "int32", + id: 1 + }, + Amount: { + type: "int32", + id: 2 + }, + star: { + type: "int32", + id: 3 + }, + lv: { + type: "int32", + id: 4 + } + } + }, + HeroGetSpecifiedResp: { + fields: { + hero: { + type: "DBHero", + id: 1 + } + } + }, + HeroDelHeroPush: { + fields: { + heros: { + keyType: "string", + type: "int32", + id: 1 + } + } + }, + HeroDrawCardReq: { + fields: { + drawCount: { + type: "int32", + id: 1 + } + } + }, + HeroDrawCardResp: { + fields: { + heroes: { + rule: "repeated", + type: "int32", + id: 1 + } + } + }, DB_UserItemData: { fields: { gridId: { @@ -1138,19 +1402,24 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr } } }, + ItemsChangePush: { + fields: { + Grids: { + rule: "repeated", + type: "DB_UserItemData", + id: 1 + } + } + }, ItemsUseItemReq: { fields: { GridId: { type: "string", id: 1 }, - ItemId: { - type: "int32", - id: 2 - }, Amount: { type: "uint32", - id: 3 + id: 2 } } }, @@ -1174,7 +1443,12 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr } }, ItemsSellItemResp: { - fields: {} + fields: { + Item: { + type: "DB_UserItemData", + id: 1 + } + } }, DBMailData: { fields: { @@ -1286,6 +1560,99 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr } } }, + DBMainline: { + fields: { + id: { + type: "string", + id: 1 + }, + uid: { + type: "string", + id: 2 + }, + chapterId: { + type: "int32", + id: 3 + }, + mainlineId: { + type: "int32", + id: 4 + }, + intensity: { + type: "int32", + id: 5 + }, + awaredID: { + type: "int32", + id: 6 + }, + progress: { + type: "int32", + id: 7 + }, + totalBox: { + type: "int32", + id: 8 + }, + branchID: { + rule: "repeated", + type: "int32", + id: 9 + } + } + }, + MainlineGetListReq: { + fields: {} + }, + MainlineGetListResp: { + fields: { + data: { + rule: "repeated", + type: "DBMainline", + id: 1 + } + } + }, + MainlineGetRewrdReq: { + fields: { + chapterId: { + type: "uint32", + id: 1 + }, + boxId: { + type: "uint32", + id: 2 + } + } + }, + MainlineGetRewrdResp: { + fields: { + data: { + type: "DBMainline", + id: 1 + } + } + }, + MainlineChallengeReq: { + fields: { + chapterId: { + type: "uint32", + id: 1 + }, + mainlineId: { + type: "uint32", + id: 2 + } + } + }, + MainlineChallengeResp: { + fields: { + data: { + type: "DBMainline", + id: 1 + } + } + }, DBSystemNotify: { fields: { id: { @@ -1332,9 +1699,13 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr type: "string", id: 4 }, - Data: { - type: "string", + arg: { + type: "google.protobuf.Any", id: 5 + }, + Data: { + type: "google.protobuf.Any", + id: 6 } } }, @@ -1500,99 +1871,6 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr } } }, - DBStory: { - fields: { - id: { - type: "string", - id: 1 - }, - uid: { - type: "string", - id: 2 - }, - chapterId: { - type: "int32", - id: 3 - }, - storyId: { - type: "int32", - id: 4 - }, - intensity: { - type: "int32", - id: 5 - }, - awaredID: { - type: "int32", - id: 6 - }, - progress: { - type: "int32", - id: 7 - }, - totalBox: { - type: "int32", - id: 8 - }, - branchID: { - rule: "repeated", - type: "int32", - id: 9 - } - } - }, - StoryGetListReq: { - fields: {} - }, - StoryGetListResp: { - fields: { - data: { - rule: "repeated", - type: "DBStory", - id: 1 - } - } - }, - StoryGetRewrdReq: { - fields: { - chapterId: { - type: "uint32", - id: 1 - }, - boxId: { - type: "uint32", - id: 2 - } - } - }, - StoryGetRewrdResp: { - fields: { - data: { - type: "DBStory", - id: 1 - } - } - }, - StoryChallengeReq: { - fields: { - chapterId: { - type: "uint32", - id: 1 - }, - storyId: { - type: "uint32", - id: 2 - } - } - }, - StoryChallengeResp: { - fields: { - data: { - type: "DBStory", - id: 1 - } - } - }, DBTask: { fields: { id: { @@ -1696,6 +1974,10 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr rule: "repeated", type: "DBTaskActive", id: 1 + }, + active: { + type: "int32", + id: 2 } } }, @@ -1723,6 +2005,23 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr } } }, + TaskDoStrategyReq: { + fields: { + heroCfgId: { + type: "int32", + id: 1 + } + } + }, + TaskDoStrategyResp: { + fields: { + taskIds: { + rule: "repeated", + type: "int32", + id: 1 + } + } + }, CacheUser: { fields: { uid: { @@ -1733,13 +2032,17 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr type: "string", id: 2 }, - GatewayServiceId: { + ServiceTag: { type: "string", id: 3 }, - ip: { + GatewayServiceId: { type: "string", id: 4 + }, + ip: { + type: "string", + id: 5 } } }, @@ -1819,6 +2122,62 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr } } }, + DBUserSetting: { + fields: { + uid: { + type: "string", + id: 2 + }, + huazhi: { + type: "uint32", + id: 3 + }, + kangjuchi: { + type: "uint32", + id: 4 + }, + gaoguang: { + type: "bool", + id: 5 + }, + wuli: { + type: "bool", + id: 6 + }, + music: { + type: "bool", + id: 7 + }, + effect: { + type: "bool", + id: 8 + }, + guaji: { + type: "bool", + id: 9 + }, + fuben: { + type: "bool", + id: 10 + }, + tansuo: { + type: "bool", + id: 11 + }, + huodong: { + type: "bool", + id: 12 + }, + xuanshang: { + type: "bool", + id: 13 + }, + saiji: { + type: "bool", + id: 14 + } + } + }, UserLoginReq: { fields: { account: { @@ -1839,6 +2198,12 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr } } }, + UserLogoutReq: { + fields: {} + }, + UserLogoutResp: { + fields: {} + }, UserRegisterReq: { fields: { account: { @@ -1897,6 +2262,122 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr id: 1 } } + }, + UserResChangePush: { + fields: { + gold: { + type: "int32", + id: 1 + }, + exp: { + type: "int32", + id: 2 + }, + lv: { + type: "int32", + id: 3 + }, + vip: { + type: "int32", + id: 4 + }, + diamond: { + type: "int32", + id: 5 + } + } + }, + UserGetSettingReq: { + fields: {} + }, + UserGetSettingResp: { + fields: { + setting: { + type: "DBUserSetting", + id: 1 + } + } + }, + UserUpdateSettingReq: { + fields: { + setting: { + type: "DBUserSetting", + id: 1 + } + } + }, + UserUpdateSettingResp: { + fields: {} + }, + UserVeriCodeReq: { + fields: {} + }, + UserVeriCodeResp: { + fields: { + code: { + type: "int32", + id: 1 + } + } + }, + UserInitdataReq: { + fields: { + code: { + type: "int32", + id: 1 + } + } + }, + UserInitdataResp: { + fields: {} + }, + DBUserExpand: { + fields: { + id: { + type: "string", + id: 1 + }, + uid: { + type: "string", + id: 2 + }, + lastreadnotiftime: { + type: "int64", + id: 3 + }, + chatchannel: { + type: "int32", + id: 4 + } + } + }, + DBUserRecord: { + fields: { + id: { + type: "string", + id: 1 + }, + uid: { + type: "string", + id: 2 + }, + type: { + type: "int32", + id: 3 + }, + parame: { + type: "int32", + id: 4 + }, + value: { + type: "int32", + id: 5 + }, + ctime: { + type: "int64", + id: 6 + } + } } }); diff --git a/src/pb/proto/chat_db.proto b/src/pb/proto/chat_db.proto new file mode 100644 index 0000000..d6b141b --- /dev/null +++ b/src/pb/proto/chat_db.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +option go_package = ".;pb"; + +enum ChatChannel { + World = 0; //世界频道 + Union = 1; //工会频道 + Private = 2; //私有频道 + CrossServer = 3; //跨服频道 + System = 4; //系统频道 +} + +message DBChat { + string id = 1; //主键id + ChatChannel channel = 2; //频道 + string suid = 3; //发送用户id + string ruid = 4; //接收用户id channel == Private 有效 + int32 groud = 5; //跨服频道 分组id + int32 areaId = 6; //跨服频道 频道Id + string unionId = 7; //工会id + int32 headid = 8; //用户头像 + string uname = 9; //用户名 + string content = 10; //内容 + int64 ctime = 11; //创建时间 +} \ No newline at end of file diff --git a/src/pb/proto/chat_msg.proto b/src/pb/proto/chat_msg.proto new file mode 100644 index 0000000..7a3233c --- /dev/null +++ b/src/pb/proto/chat_msg.proto @@ -0,0 +1,51 @@ +syntax = "proto3"; +option go_package = ".;pb"; +import "chat_db.proto"; + +//聊天消息推送 +message ChatMessagePush { DBChat chat = 1; } + +//申请跨服频道号 +message ChatCrossChannelReq {} +//申请跨服频道号 回应 +message ChatCrossChannelResp { int32 channelId = 1; } + +//申请切换频道 +message ChatChanageChannelReq { int32 channelId = 1; } +//申请切换频道 回应 +message ChatChanageChannelResp { + int32 channelId = 1; + bool isSucc = 2; +} + +//请求聊天消息 +message ChatGetListReq { + ChatChannel channel = 1; //频道 +} +//请求聊天消息 回应 +message ChatGetListResp { repeated DBChat chats = 1; } + +//请求跨服聊天消息 +message ChatSpanGetListReq { + ChatChannel channel = 1; //频道 + int32 channelId = 2; //跨服频道id +} +//请求跨服聊天消息 回应 +message ChatSpanGetListResp { repeated DBChat chats = 1; } + +//消息发送请求 +message ChatSendReq { + ChatChannel channel = 1; //频道 + string targetId = 2; //目标用户id + string content = 3; //内容 +} +//消息发送请求 回应 +message ChatSendResp {} + +//跨服消息发送请求 +message ChatSpanSendReq { + ChatChannel channel = 1; //频道 + string content = 2; //内容 +} +//跨服消息发送请求 回应 +message ChatSpanSendResp {} diff --git a/src/pb/proto/comm.proto b/src/pb/proto/comm.proto index ba2de3d..6b20b21 100644 --- a/src/pb/proto/comm.proto +++ b/src/pb/proto/comm.proto @@ -17,10 +17,11 @@ message AgentMessage { string Ip = 1; string UserSessionId = 2; string UserId = 3; - string GatewayServiceId = 4; - string MainType = 5; - string SubType = 6; - google.protobuf.Any Message = 7; + string ServiceTag = 4; + string GatewayServiceId = 5; + string MainType = 6; + string SubType = 7; + google.protobuf.Any Message = 8; } // RPC 服务固定回复结构 @@ -66,8 +67,11 @@ message AgentCloseeReq { string UserSessionId = 1; } //通知用户离线 message NoticeUserCloseReq { - string UserSessionId = 1; - string UserId = 2; + string Ip = 1; + string UserSessionId = 2; + string UserId = 3; + string ServiceTag = 4; + string GatewayServiceId = 5; } //英雄属性类型 diff --git a/src/pb/proto/equipment_msg.proto b/src/pb/proto/equipment_msg.proto index 1518e57..e8cdbe7 100644 --- a/src/pb/proto/equipment_msg.proto +++ b/src/pb/proto/equipment_msg.proto @@ -3,32 +3,36 @@ option go_package = ".;pb"; import "equipment_db.proto"; //获取装备列表请求 -message EquipmentGetListReq { - -} +message EquipmentGetListReq {} //获取装备列表请求 回应 message EquipmentGetListResp { - repeated DB_Equipment Equipments = 1; //装备列表 + repeated DB_Equipment Equipments = 1; //装备列表 +} + +//推送装备背包变化 +message EquipmentChangePush { + repeated DB_Equipment Equipments = 1; //装备列表 } //装备挂在到英雄上 -message EquipmentEquipReq{ - string HeroCardId = 1; //英雄卡Id - repeated string EquipmentId = 2; //装备Id 固定长度的数组 0-5 对应的装备栏 +message EquipmentEquipReq { + string HeroCardId = 1; //英雄卡Id + repeated string EquipmentId = 2; //装备Id 固定长度的数组 0-5 对应的装备栏 } //装备挂在到英雄上 回应 -message EquipmentEquipResp{ - repeated DB_Equipment Equipments = 1; //挂在装备列表 +message EquipmentEquipResp { + repeated DB_Equipment Equipments = 1; //挂在装备列表 } //装备升级 -message EquipmentUpgradeReq{ - string EquipmentId = 1; //装备Id +message EquipmentUpgradeReq { + string EquipmentId = 1; //装备Id } //装备升级 回应 -message EquipmentUpgradeResp{ - bool IsSucc = 1; - repeated DB_Equipment Equipment = 2; //由于装备可以叠加 升级后会创建一个新的装备出来 所以可能影响两个装备 +message EquipmentUpgradeResp { + bool IsSucc = 1; + repeated DB_Equipment Equipment = + 2; //由于装备可以叠加 升级后会创建一个新的装备出来 所以可能影响两个装备 } \ No newline at end of file diff --git a/src/pb/proto/errorcode.proto b/src/pb/proto/errorcode.proto index 9f8b44f..6f07c13 100644 --- a/src/pb/proto/errorcode.proto +++ b/src/pb/proto/errorcode.proto @@ -30,6 +30,8 @@ enum ErrorCode { DiamondNoEnough = 1004; // 钻石不足 RoleCreated = 1005; //已创角 NameExist = 1006; //昵称已存在 + VeriCodeNoValid = 1007; //验证码无效 + VeriCodeExpired = 1008; //验证码过期 // friend FriendNotSelf = 1100; //不能是自己 @@ -66,20 +68,30 @@ enum ErrorCode { HeroEquipUpdate = 1311; // 更新装备失败 HeroMaxAwaken = 1312; // 达到最大觉醒等级 HeroIsLock = 1313; // 英雄被锁定不能被消耗 + HeroMaxCount = 1314; // 英雄达到最大数量 + HeroCostTypeErr = 1315; // 消耗英雄参数不匹配 + HeroStarErr = 1316; // 不满足升星条件 + HeroTypeErr = 1317; // 升级英雄类型不对 + HeroExpTypeErr = 1318; // 技能升级卡类型不对 + HeroAddMaxExp = 1319; // 升级经验卡溢出 检查传入的数量 + HeroStarLvErr = 1320; // 升星等级不够 + HeroMaxStarLv = 1321; // 达到最大升星等级 // equipment EquipmentOnFoundEquipment = 1400; // 未找到武器 EquipmentLvlimitReached = 1401; // 武器等级已达上限 - // mainStory - StoryNotFindChapter = 1500; // 没有找到主线关卡信息 - StoryIDFailed = 1501; // 关卡ID 错误 + // mainMainline + MainlineNotFindChapter = 1500; // 没有找到主线关卡信息 + MainlineIDFailed = 1501; // 关卡ID 错误 // task TaskInit = 1600; //初始化失败 TaskReset = 1601; //重置任务失败 TaskHandle = 1602; //任务处理失败 TaskReceived = 1603; //已领取 - TaskActiveInit = 1606; //初始化活跃度失败 - TaskActiveNofound = 1604; //未找到用户活跃度配置 - TaskActiveNoenough = 1605; //活跃值未达标 + TaskActiveInit = 1604; //初始化活跃度失败 + TaskActiveNofound = 1605; //未找到用户活跃度配置 + TaskActiveNoenough = 1606; //活跃值未达标 + TaskNoFinished = 1607; //任务未完成 + TaskFinished = 1608; //已完成 } \ No newline at end of file diff --git a/src/pb/proto/google/protobuf/any.proto b/src/pb/proto/google/protobuf/any.proto new file mode 100644 index 0000000..e2c2042 --- /dev/null +++ b/src/pb/proto/google/protobuf/any.proto @@ -0,0 +1,158 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "google.golang.org/protobuf/types/known/anypb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "AnyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// +// JSON +// +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +message Any { + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + // + string type_url = 1; + + // Must be a valid serialized protocol buffer of the above specified type. + bytes value = 2; +} diff --git a/src/pb/proto/hero_db.proto b/src/pb/proto/hero_db.proto index 0a12ead..fd36e29 100644 --- a/src/pb/proto/hero_db.proto +++ b/src/pb/proto/hero_db.proto @@ -17,21 +17,17 @@ message DBHero { int32 captainSkill = 8; //@go_tags(`bson:"captainSkill"`) 队长技能 repeated SkillData normalSkill = 9; //@go_tags(`bson:"normalSkill"`) 普通技能 map property = 10; // 属性相关 - map addProperty = - 11; //@go_tags(`bson:"addProperty"`) 附加属性相关 - int32 formation = 12; // 阵型类型 - int32 cardType = - 13; //@go_tags(`bson:"cardType"`) 卡片类型(升星卡、经验卡、技能升级卡) - int32 curSkin = 14; //@go_tags(`bson:"curSkin"`) 当前装备的皮肤ID - repeated int32 skins = 15; // 所有皮肤ID - bool block = 16; // 锁定 - repeated string equipID = 17; //@go_tags(`bson:"equipID"`) 装备 objID - int32 resonateNum = 18; //@go_tags(`bson:"resonateNum"`) 共鸣次数 - int32 distributionResonate = - 19; //@go_tags(`bson:"distributionResonate"`) 分配的共鸣能量 - map energy = 20; // @go_tags(`bson:"energy"`)能量分配到哪里[1,0] - int32 sameCount = 21; // @go_tags(`bson:"sameCount"`) 卡片叠加数量 - int32 suiteId = 22; //@go_tags(`bson:"suiteId"`) 套装Id - int32 suiteExtId = 23; // go_tags(`bson:"suiteExtId"`) 扩展套装Id - bool isOverlying = 24; // go_tags(`bson:"isOverlying"`) 是否允许叠加 默认true + map addProperty = 11; //@go_tags(`bson:"addProperty"`) 附加属性相关 + int32 cardType = 12; //@go_tags(`bson:"cardType"`) 卡片类型(升星卡、经验卡、技能升级卡) + int32 curSkin = 13; //@go_tags(`bson:"curSkin"`) 当前装备的皮肤ID + repeated int32 skins = 14; // 所有皮肤ID + bool block = 15; // 锁定 + repeated string equipID = 16; //@go_tags(`bson:"equipID"`) 装备 objID + int32 resonateNum = 17; //@go_tags(`bson:"resonateNum"`) 共鸣次数 + int32 distributionResonate = 18; //@go_tags(`bson:"distributionResonate"`) 分配的共鸣能量 + map energy = 19; // @go_tags(`bson:"energy"`)能量分配到哪里[1,0] + int32 sameCount = 20; // @go_tags(`bson:"sameCount"`) 卡片叠加数量 + int32 suiteId = 21; //@go_tags(`bson:"suiteId"`) 套装Id + int32 suiteExtId = 22; // go_tags(`bson:"suiteExtId"`) 扩展套装Id + bool isOverlying = 23; // go_tags(`bson:"isOverlying"`) 是否允许叠加 默认true } \ No newline at end of file diff --git a/src/pb/proto/hero_msg.proto b/src/pb/proto/hero_msg.proto index 1c1bd9b..e1bf715 100644 --- a/src/pb/proto/hero_msg.proto +++ b/src/pb/proto/hero_msg.proto @@ -25,8 +25,7 @@ message ItemData { // 卡牌升级 message HeroStrengthenUplvReq { string heroObjID = 1; // 英雄对象ID - string expCardID = 2; // 经验卡对象ID - int32 amount = 3; // 消耗经验卡数量} + map expCards = 2; } // 卡牌升级返回 @@ -63,7 +62,7 @@ message HeroStrengthenUpSkillResp { // 共鸣英雄 message HeroResonanceReq { - string heroObjID = 1; // 英雄对象ID + string heroObjID = 1; // 英雄对象ID repeated string costObjID = 2; // 消耗对象 } @@ -110,18 +109,45 @@ message HeroChoukaReq { repeated int32 heroIds = 1; } message HeroChoukaResp { repeated DBHero heroes = 1; } //英雄属性推送 -message HeroProperty { +message HeroPropertyPush { string heroId = 1; //英雄唯一ID map property = 2; //基础属性 map addProperty = 3; //附加属性 } // 英雄锁定 -message HeroLockReq{ - string heroid = 1; -} +message HeroLockReq { string heroid = 1; } // 英雄锁定返回 -message HeroLockResp{ - DBHero hero = 1; // 英雄对象 +message HeroLockResp { + DBHero hero = 1; // 英雄对象 +} + +// 增加新英雄推送 +message HeroAddNewHeroPush { + DBHero hero = 1; // 英雄对象 + int32 count = 2; //数量 +} + +// 测试用(获取指定星级等级的英雄) +message HeroGetSpecifiedReq { + int32 heroCoinfigID = 1; // 英雄配置ID + int32 Amount = 2; // 数量 + int32 star = 3; // 星级 + int32 lv = 4; // 等级 +} + +message HeroGetSpecifiedResp { + DBHero hero = 1; // 英雄对象 +} + +message HeroDelHeroPush { map heros = 1; } + +// 抽卡 +message HeroDrawCardReq { + int32 drawCount = 1; // 抽卡次数, 只能是单抽和十抽 +} + +message HeroDrawCardResp { + repeated int32 heroes = 1; // 返回英雄的configID } \ No newline at end of file diff --git a/src/pb/proto/items_msg.proto b/src/pb/proto/items_msg.proto index f6eb444..401ce7d 100644 --- a/src/pb/proto/items_msg.proto +++ b/src/pb/proto/items_msg.proto @@ -4,34 +4,36 @@ import "items_db.proto"; //查询用户背包请求 message ItemsGetlistReq { - int32 IType = 1; //道具类型 + int32 IType = 1; //道具类型 } //查询用户背包请求 回应 message ItemsGetlistResp { - repeated DB_UserItemData Grids = 1; //用户背包列表 + repeated DB_UserItemData Grids = 1; //用户背包列表 +} + +//背包变化推送 +message ItemsChangePush { + repeated DB_UserItemData Grids = 1; //变化数据 } //使用物品请求 message ItemsUseItemReq { - string GridId = 1; //格子Id - int32 ItemId = 2; //物品Id - uint32 Amount = 3; //使用数量 + string GridId = 1; //格子Id + uint32 Amount = 2; //使用数量 } //使用物品请求 回应 -message ItemsUseItemResp { - -} +message ItemsUseItemResp {} //出售道具请求sailitem message ItemsSellItemReq { - string GridId = 1; //格子Id - int32 ItemId = 2; //物品Id - uint32 Amount = 3; //使用数量 + string GridId = 1; //格子Id + int32 ItemId = 2; //物品Id + uint32 Amount = 3; //使用数量 } //出售道具请求 回应 message ItemsSellItemResp { - + DB_UserItemData Item = 1; //变化物品 } \ No newline at end of file diff --git a/src/pb/proto/mail_msg.proto b/src/pb/proto/mail_msg.proto index 55fa623..33561fa 100644 --- a/src/pb/proto/mail_msg.proto +++ b/src/pb/proto/mail_msg.proto @@ -2,43 +2,27 @@ syntax = "proto3"; option go_package = ".;pb"; import "mail_db.proto"; -message MailGetListReq { - -} +message MailGetListReq {} // 查询邮件信息 -message MailGetListResp { - repeated DBMailData Mails = 1; -} +message MailGetListResp { repeated DBMailData Mails = 1; } // 查看邮件 -message MailReadMailReq { - string ObjID = 1; -} +message MailReadMailReq { string ObjID = 1; } -message MailReadMailResp { - DBMailData Mail = 1; -} +message MailReadMailResp { DBMailData Mail = 1; } // 领取附件 -message MailGetUserMailAttachmentReq { - string ObjID = 1; -} +message MailGetUserMailAttachmentReq { string ObjID = 1; } -message MailGetUserMailAttachmentResp { - DBMailData Mail = 1; -} +message MailGetUserMailAttachmentResp { DBMailData Mail = 1; } // 删除某个邮件 -message MailDelMailReq { - string ObjID = 1; -} +message MailDelMailReq { string ObjID = 1; } -message MailDelMailResp { - repeated DBMailData Mail = 1; -} +message MailDelMailResp { repeated DBMailData Mail = 1; } // 推送邮件 -message MailGetNewMailPush{ - DBMailData Mail = 1; // 推送新的邮件信息 +message MailGetNewMailPush { + DBMailData Mail = 1; // 推送新的邮件信息 } \ No newline at end of file diff --git a/src/pb/proto/story_db.proto b/src/pb/proto/mainline_db.proto similarity index 86% rename from src/pb/proto/story_db.proto rename to src/pb/proto/mainline_db.proto index 5e1bea8..08b8204 100644 --- a/src/pb/proto/story_db.proto +++ b/src/pb/proto/mainline_db.proto @@ -1,11 +1,11 @@ syntax = "proto3"; option go_package = ".;pb"; -message DBStory { +message DBMainline { string id = 1; //@go_tags(`bson:"_id"`) ID string uid = 2; //@go_tags(`bson:"uid"`) 用户ID int32 chapterId = 3; //@go_tags(`bson:"chapterId"`) 章节ID - int32 storyId = 4; //@go_tags(`bson:"storyId"`) 主线关卡ID + int32 mainlineId = 4; //@go_tags(`bson:"mainlineId"`) 主线关卡ID int32 intensity = 5; //@go_tags(`bson:"intensity"`) 难度类型 int32 awaredID = 6; //@go_tags(`bson:"awaredID"`) 领奖ID int32 progress = 7; // @go_tags(`bson:"progress"`) 通关进度(打了多少主关卡) diff --git a/src/pb/proto/mainline_msg.proto b/src/pb/proto/mainline_msg.proto new file mode 100644 index 0000000..d2be58f --- /dev/null +++ b/src/pb/proto/mainline_msg.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; +option go_package = ".;pb"; +import "mainline_db.proto"; + +// 查询关卡进度 +message MainlineGetListReq {} +// 返回进度信息 +message MainlineGetListResp { repeated DBMainline data = 1; } + +// 领取关卡宝箱 +message MainlineGetRewrdReq { + uint32 chapterId = 1; // 章节ID + uint32 boxId = 2; // 宝箱ID +} + +message MainlineGetRewrdResp { + DBMainline data = 1; //当前章节信息 +} + +// 挑战关卡 +message MainlineChallengeReq { + uint32 chapterId = 1; // 章节ID + uint32 mainlineId = 2; // 小关ID +} + +message MainlineChallengeResp { + DBMainline data = 1; //当前章节信息 +} \ No newline at end of file diff --git a/src/pb/proto/notify_msg.proto b/src/pb/proto/notify_msg.proto index 1008862..63dc339 100644 --- a/src/pb/proto/notify_msg.proto +++ b/src/pb/proto/notify_msg.proto @@ -1,23 +1,25 @@ syntax = "proto3"; option go_package = ".;pb"; import "errorcode.proto"; -import "notify/notify_db.proto"; +import "notify_db.proto"; +import "google/protobuf/any.proto"; //统一错误码推送 message NotifyErrorNotifyPush { - string ReqMainType =1; // 请求协议模块 模块名 例如:user 对应项目中 user的模块 - string ReqSubType = 2; // 请求协议函数 例如:login 对应项目中 user的模块中 api_login 的处理函数 - ErrorCode Code = 3; // 执行返回错误码 对应 errorcode.proto 枚举 - string Message = 4; // 错误消息 - string Data = 5; // 错误数据 + string ReqMainType = 1; // 请求协议模块 模块名 例如:user 对应项目中 user的模块 + string ReqSubType = 2; // 请求协议函数 例如:login 对应项目中 user的模块中 + // api_login 的处理函数 + ErrorCode Code = 3; // 执行返回错误码 对应 errorcode.proto 枚举 + string Message = 4; // 错误消息 + google.protobuf.Any arg = 5; //参数信息 + google.protobuf.Any Data = 6; // 错误数据 } //获取系统公告 请求 -message NotifyGetListReq { -} +message NotifyGetListReq {} //获取系统公告 回应 message NotifyGetListResp { - int64 LastReadTime = 1; //最后一次阅读时间 - repeated DBSystemNotify SysNotify = 2; //公告列表 + int64 LastReadTime = 1; //最后一次阅读时间 + repeated DBSystemNotify SysNotify = 2; //公告列表 } \ No newline at end of file diff --git a/src/pb/proto/shop_msg.proto b/src/pb/proto/shop_msg.proto index 860230a..2ae8c64 100644 --- a/src/pb/proto/shop_msg.proto +++ b/src/pb/proto/shop_msg.proto @@ -3,33 +3,32 @@ option go_package = ".;pb"; import "shop_db.proto"; import "comm.proto"; - //商品对象数据 message ShopItem { - int32 GoodsId = 1; //商品Id - repeated UserAssets Items = 2; //货物 - repeated UserAssets Consume = 3; //消耗 - int32 Sale = 4; //打折 - int32 LeftBuyNum = 5; //还可购买次数 + int32 GoodsId = 1; //商品Id + repeated UserAssets Items = 2; //货物 + repeated UserAssets Consume = 3; //消耗 + int32 Sale = 4; //打折 + int32 LeftBuyNum = 5; //还可购买次数 } //获取装备列表请求 message ShopGetListReq { - ShopType sType = 1; //商城类型 - bool IsManualRefresh = 2; //是否手动刷新 + ShopType sType = 1; //商城类型 + bool IsManualRefresh = 2; //是否手动刷新 } //获取装备列表请求 message ShopGetListResp { - repeated ShopItem Goods = 1; //商品列表 + repeated ShopItem Goods = 1; //商品列表 } //购买商品 请求 message ShopBuyReq { - int32 GoodsId = 1; //商品Id + int32 GoodsId = 1; //商品Id } //购买商品 回应 message ShopBuyResp { - bool IsSucc = 1; //是否成功 + bool IsSucc = 1; //是否成功 } diff --git a/src/pb/proto/story_msg.proto b/src/pb/proto/story_msg.proto deleted file mode 100644 index ff7fd17..0000000 --- a/src/pb/proto/story_msg.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -option go_package = ".;pb"; -import "story_db.proto"; - -// 查询关卡进度 -message StoryGetListReq { - -} -// 返回进度信息 -message StoryGetListResp { - repeated DBStory data = 1; -} - -// 领取关卡宝箱 -message StoryGetRewrdReq { - uint32 chapterId = 1; // 章节ID - uint32 boxId = 2; // 宝箱ID -} - -message StoryGetRewrdResp { - DBStory data = 1; //当前章节信息 -} - -// 挑战关卡 -message StoryChallengeReq { - uint32 chapterId = 1; // 章节ID - uint32 storyId = 2; // 小关ID -} - -message StoryChallengeResp { - DBStory data = 1; //当前章节信息 -} \ No newline at end of file diff --git a/src/pb/proto/task_msg.proto b/src/pb/proto/task_msg.proto index 261b696..5099bc9 100644 --- a/src/pb/proto/task_msg.proto +++ b/src/pb/proto/task_msg.proto @@ -21,7 +21,10 @@ message TaskListResp { repeated DBTask list = 1; } //活跃度 message TaskActiveListReq { int32 taskTag = 1; } -message TaskActiveListResp { repeated DBTaskActive list = 1; } +message TaskActiveListResp { + repeated DBTaskActive list = 1; //活跃度列表 + int32 active = 2; //活跃度值 +} //活跃度领取 message TaskActiveReceiveReq { @@ -31,4 +34,13 @@ message TaskActiveReceiveReq { message TaskActiveReceiveResp { int32 taskTag = 1; string id = 2; +} + +//攻略 +message TaskDoStrategyReq { + int32 heroCfgId = 1; //英雄ID +} + +message TaskDoStrategyResp { + repeated int32 taskIds = 1; //任务ID } \ No newline at end of file diff --git a/src/pb/proto/user_db.proto b/src/pb/proto/user_db.proto index 17fadb1..5237fdc 100644 --- a/src/pb/proto/user_db.proto +++ b/src/pb/proto/user_db.proto @@ -2,10 +2,11 @@ syntax = "proto3"; option go_package = ".;pb"; message CacheUser { - string uid = 1; - string SessionId = 2; - string GatewayServiceId = 3; - string ip = 4; + string uid = 1; //用户id + string SessionId = 2; //会话id + string ServiceTag = 3; //所在服务集群 区服id + string GatewayServiceId = 4; //所在网关服务id + string ip = 5; //远程ip // DB_UserData UserData = 4; //@go_tags(`json:",inline"`) } @@ -28,4 +29,21 @@ message DBUser { int32 lv = 16; //@go_tags(`bson:"lv"`) 等级 int32 vip = 17; //@go_tags(`bson:"vip"`) vip int32 diamond = 18; //@go_tags(`bson:"diamond"`) 钻石 +} + +message DBUserSetting { + string uid = 2; //@go_tags(`bson:"uid"`) 用户ID + uint32 huazhi = 3; //@go_tags(`bson:"huazhi"`) 画质 0极致 1精致 2正常 3流畅 + uint32 kangjuchi = 4; //@go_tags(`bson:"kangjuchi"`) 抗锯齿 0 1 2 3 + bool gaoguang = 5; //@go_tags(`bson:"gaoguang"`) 高光 + bool wuli = 6; //@go_tags(`bson:"wuli"`) 物理模拟 + bool music = 7; //@go_tags(`bson:"music"`) 音乐 + bool effect = 8; //@go_tags(`bson:"effect"`) 音效 + + bool guaji = 9; //@go_tags(`bson:"guaji"`) 挂机 + bool fuben = 10; //@go_tags(`bson:"fuben"`) 特殊副本重置 + bool tansuo = 11; //@go_tags(`bson:"tansuo"`) 蜂窝探索 + bool huodong = 12; //@go_tags(`bson:"huodong"`) 特殊活动开启 + bool xuanshang = 13; //@go_tags(`bson:"wanfa"`)悬赏玩法重置 + bool saiji = 14; //@go_tags(`bson:"wanfa"`)格斗场玩法赛季重置 } \ No newline at end of file diff --git a/src/pb/proto/user_msg.proto b/src/pb/proto/user_msg.proto index 544ec57..f696d90 100644 --- a/src/pb/proto/user_msg.proto +++ b/src/pb/proto/user_msg.proto @@ -3,6 +3,7 @@ option go_package = ".;pb"; import "errorcode.proto"; import "user_db.proto"; import "comm.proto"; + //用户登录 message UserLoginReq { string account = 1; //账号 @@ -11,6 +12,12 @@ message UserLoginReq { message UserLoginResp { DBUser data = 1; } +//登出 +message UserLogoutReq {} + +message UserLogoutResp {} + +//注册 message UserRegisterReq { string account = 1; int32 sid = 2; @@ -38,3 +45,34 @@ message UserAddResReq { message UserAddResResp { UserAssets res = 1; //资源类型 } + +// 玩家资源变更推送 +message UserResChangePush { + int32 gold = 1; //@go_tags(`bson:"gold"`) 金币 + int32 exp = 2; //@go_tags(`bson:"exp"`) 经验 + int32 lv = 3; //@go_tags(`bson:"lv"`) 等级 + int32 vip = 4; //@go_tags(`bson:"vip"`) vip + int32 diamond = 5; //@go_tags(`bson:"diamond"`) 钻石 +} + +//用户设置获取 +message UserGetSettingReq {} + +message UserGetSettingResp { + DBUserSetting setting = 1; //用户设置 +} + +// 更新用户设置 +message UserUpdateSettingReq { DBUserSetting setting = 1; } +message UserUpdateSettingResp {} + +// 初始化验证码 +message UserVeriCodeReq {} +message UserVeriCodeResp { + int32 code = 1; //验证码 +} + +message UserInitdataReq { + int32 code = 1; //验证码 +} +message UserInitdataResp {} \ No newline at end of file diff --git a/src/pb/proto/userexpand.proto b/src/pb/proto/userexpand.proto new file mode 100644 index 0000000..8ce3d42 --- /dev/null +++ b/src/pb/proto/userexpand.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +option go_package = ".;pb"; + + +//用户扩展数据 +message DBUserExpand { + string id = 1; //主键id + string uid = 2; //用户id + int64 lastreadnotiftime = 3; //最后阅读公告时间 + int32 chatchannel = 4; //跨服聊天频道 + } \ No newline at end of file diff --git a/src/pb/proto/userrecord.proto b/src/pb/proto/userrecord.proto new file mode 100644 index 0000000..c72f140 --- /dev/null +++ b/src/pb/proto/userrecord.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; +option go_package = ".;pb"; + + +//用户扩展数据 +message DBUserRecord { + string id = 1; // 主键id + string uid = 2; // 用户id + int32 type = 3; // 数据类型 + int32 parame = 4; // 参数 + int32 value = 5; // 值 + int64 ctime = 6; // 创建时间 +} \ No newline at end of file diff --git a/src/views/protocol/Index.vue b/src/views/protocol/Index.vue index db20823..8e3a782 100644 --- a/src/views/protocol/Index.vue +++ b/src/views/protocol/Index.vue @@ -212,7 +212,8 @@ export default defineComponent({ { mainType: 'hero', subs: [] }, { mainType: 'shop', subs: [] }, { mainType: 'stak', subs: [] }, - { mainType: 'story', subs: [] }, + { mainType: 'mainline', subs: [] }, + { mainType: 'chat', subs: [] }, ]) for (const v of Object.keys(proto)) { for (const v1 of proto_models) { @@ -467,7 +468,7 @@ export default defineComponent({ }) .catch((error) => { console.log('接收到消息异常', error) - this.pushlog('error', '接收消息异常', { msg: msg, e: e }) + this.pushlog('error', '接收消息异常', error) }) }, //请求消息