上传协议工具类代码
This commit is contained in:
parent
8e92612731
commit
c64cd72754
173
src/pb/proto.js
173
src/pb/proto.js
@ -1602,7 +1602,10 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
PracticeYouQiecuoing: 4305,
|
PracticeYouQiecuoing: 4305,
|
||||||
PracticeTargetQiecuoing: 4306,
|
PracticeTargetQiecuoing: 4306,
|
||||||
ParkourMemberFull: 4401,
|
ParkourMemberFull: 4401,
|
||||||
ParkourInviteOverdue: 4402
|
ParkourInviteOverdue: 4402,
|
||||||
|
ParkourInviteNoPermissions: 4403,
|
||||||
|
ParkourTargetTeamed: 4404,
|
||||||
|
ReputationTalentFull: 4501
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
google: {
|
google: {
|
||||||
@ -7942,9 +7945,10 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
},
|
},
|
||||||
RaceTeamState: {
|
RaceTeamState: {
|
||||||
values: {
|
values: {
|
||||||
teaming: 0,
|
resting: 0,
|
||||||
matching: 1,
|
teaming: 1,
|
||||||
raceing: 2
|
matching: 2,
|
||||||
|
raceing: 3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
DBRaceMember: {
|
DBRaceMember: {
|
||||||
@ -8030,23 +8034,27 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
type: "RaceTeamState",
|
type: "RaceTeamState",
|
||||||
id: 5
|
id: 5
|
||||||
},
|
},
|
||||||
|
currbattid: {
|
||||||
|
type: "string",
|
||||||
|
id: 6
|
||||||
|
},
|
||||||
integral: {
|
integral: {
|
||||||
type: "int32",
|
type: "int32",
|
||||||
id: 6
|
id: 7
|
||||||
},
|
},
|
||||||
captainid: {
|
captainid: {
|
||||||
type: "string",
|
type: "string",
|
||||||
id: 7
|
id: 8
|
||||||
},
|
},
|
||||||
invite: {
|
invite: {
|
||||||
rule: "repeated",
|
rule: "repeated",
|
||||||
type: "DBRaceInvite",
|
type: "DBRaceInvite",
|
||||||
id: 8
|
id: 9
|
||||||
},
|
},
|
||||||
member: {
|
member: {
|
||||||
rule: "repeated",
|
rule: "repeated",
|
||||||
type: "DBRaceMember",
|
type: "DBRaceMember",
|
||||||
id: 9
|
id: 10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -8100,6 +8108,26 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
ParkourChangeMtsReq: {
|
||||||
|
fields: {
|
||||||
|
mtsid: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ParkourChangeMtsResp: {
|
||||||
|
fields: {
|
||||||
|
issucc: {
|
||||||
|
type: "bool",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
mtsid: {
|
||||||
|
type: "string",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
ParkourInfoChangePush: {
|
ParkourInfoChangePush: {
|
||||||
fields: {
|
fields: {
|
||||||
info: {
|
info: {
|
||||||
@ -8258,20 +8286,41 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
fields: {}
|
fields: {}
|
||||||
},
|
},
|
||||||
ParkourAllSprintsPush: {
|
ParkourAllSprintsPush: {
|
||||||
fields: {}
|
|
||||||
},
|
|
||||||
ParkourRaceChanagePush: {
|
|
||||||
fields: {
|
fields: {
|
||||||
race: {
|
left: {
|
||||||
type: "DBRace",
|
type: "int32",
|
||||||
id: 1
|
id: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
ParkourPlayerHPChanagePush: {
|
||||||
|
fields: {
|
||||||
|
uid: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
hp: {
|
||||||
|
type: "int32",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ParkourScoreChanagePush: {
|
||||||
|
fields: {
|
||||||
|
red: {
|
||||||
|
type: "int32",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
blue: {
|
||||||
|
type: "int32",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
ParkourRaceOverPush: {
|
ParkourRaceOverPush: {
|
||||||
fields: {
|
fields: {
|
||||||
race: {
|
winside: {
|
||||||
type: "DBRace",
|
type: "int32",
|
||||||
id: 1
|
id: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8292,6 +8341,17 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
RPCParkourJoinMatchResp: {
|
RPCParkourJoinMatchResp: {
|
||||||
fields: {}
|
fields: {}
|
||||||
},
|
},
|
||||||
|
RPCParkourCancelMatchReq: {
|
||||||
|
fields: {
|
||||||
|
captainid: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
RPCParkourCancelMatchResp: {
|
||||||
|
fields: {}
|
||||||
|
},
|
||||||
RPCParkourMatchSuccReq: {
|
RPCParkourMatchSuccReq: {
|
||||||
fields: {
|
fields: {
|
||||||
red: {
|
red: {
|
||||||
@ -8309,6 +8369,21 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
RPCParkourMatchSuccResp: {
|
RPCParkourMatchSuccResp: {
|
||||||
fields: {}
|
fields: {}
|
||||||
},
|
},
|
||||||
|
RPC_ParkourTrusteeshipReq: {
|
||||||
|
fields: {
|
||||||
|
battleid: {
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
uid: {
|
||||||
|
type: "string",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
RPC_ParkourTrusteeshipResp: {
|
||||||
|
fields: {}
|
||||||
|
},
|
||||||
DBPayOrder: {
|
DBPayOrder: {
|
||||||
fields: {
|
fields: {
|
||||||
orderid: {
|
orderid: {
|
||||||
@ -9474,6 +9549,22 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
RPC_PVPTrusteeshipReq: {
|
||||||
|
fields: {
|
||||||
|
battleid: {
|
||||||
|
rule: "repeated",
|
||||||
|
type: "string",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
uid: {
|
||||||
|
type: "string",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
RPC_PVPTrusteeshipResp: {
|
||||||
|
fields: {}
|
||||||
|
},
|
||||||
ReddotGetAllReq: {
|
ReddotGetAllReq: {
|
||||||
fields: {}
|
fields: {}
|
||||||
},
|
},
|
||||||
@ -9514,10 +9605,6 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
keyType: "int32",
|
keyType: "int32",
|
||||||
type: "Camp",
|
type: "Camp",
|
||||||
id: 2
|
id: 2
|
||||||
},
|
|
||||||
attrGlobal: {
|
|
||||||
type: "CampAttr",
|
|
||||||
id: 3
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -9574,9 +9661,24 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
reputationTalenttestReq: {
|
||||||
|
fields: {
|
||||||
|
raceType: {
|
||||||
|
type: "int32",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
friendValue: {
|
||||||
|
type: "int32",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
reputationTalenttestResp: {
|
||||||
|
fields: {}
|
||||||
|
},
|
||||||
reputationUpgradeReq: {
|
reputationUpgradeReq: {
|
||||||
fields: {
|
fields: {
|
||||||
zyId: {
|
nodeId: {
|
||||||
type: "int32",
|
type: "int32",
|
||||||
id: 1
|
id: 1
|
||||||
}
|
}
|
||||||
@ -9585,6 +9687,21 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
reputationUpgradeResp: {
|
reputationUpgradeResp: {
|
||||||
fields: {}
|
fields: {}
|
||||||
},
|
},
|
||||||
|
reputationTalentReq: {
|
||||||
|
fields: {}
|
||||||
|
},
|
||||||
|
reputationTalentResp: {
|
||||||
|
fields: {
|
||||||
|
attrGlobal: {
|
||||||
|
type: "CampAttr",
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
camp: {
|
||||||
|
type: "Camp",
|
||||||
|
id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
RtaskTestReq: {
|
RtaskTestReq: {
|
||||||
fields: {
|
fields: {
|
||||||
rtaskType: {
|
rtaskType: {
|
||||||
@ -12122,6 +12239,22 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|||||||
moongold: {
|
moongold: {
|
||||||
type: "int32",
|
type: "int32",
|
||||||
id: 10
|
id: 10
|
||||||
|
},
|
||||||
|
talent1: {
|
||||||
|
type: "int32",
|
||||||
|
id: 11
|
||||||
|
},
|
||||||
|
talent2: {
|
||||||
|
type: "int32",
|
||||||
|
id: 12
|
||||||
|
},
|
||||||
|
talent3: {
|
||||||
|
type: "int32",
|
||||||
|
id: 13
|
||||||
|
},
|
||||||
|
talent4: {
|
||||||
|
type: "int32",
|
||||||
|
id: 14
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -373,4 +373,9 @@ enum ErrorCode {
|
|||||||
//parkour
|
//parkour
|
||||||
ParkourMemberFull = 4401; //队伍成员已满
|
ParkourMemberFull = 4401; //队伍成员已满
|
||||||
ParkourInviteOverdue = 4402; //邀请已过期
|
ParkourInviteOverdue = 4402; //邀请已过期
|
||||||
|
ParkourInviteNoPermissions = 4403; //无权邀请
|
||||||
|
ParkourTargetTeamed = 4404; //目标已组队
|
||||||
|
|
||||||
|
//reputation
|
||||||
|
ReputationTalentFull = 4501; //天赋满级
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,10 @@ enum RaceType {
|
|||||||
|
|
||||||
//队伍状态
|
//队伍状态
|
||||||
enum RaceTeamState {
|
enum RaceTeamState {
|
||||||
teaming = 0; //组队中
|
resting = 0; //休息中
|
||||||
matching = 1; //匹配中
|
teaming = 1; //组队中
|
||||||
raceing = 2; //比赛中
|
matching = 2; //匹配中
|
||||||
|
raceing = 3; //比赛中
|
||||||
}
|
}
|
||||||
|
|
||||||
//队员信息
|
//队员信息
|
||||||
@ -40,10 +41,11 @@ message DBParkour {
|
|||||||
map<string,int32> mounts = 3; //坐骑列表
|
map<string,int32> mounts = 3; //坐骑列表
|
||||||
string dfmount = 4; //默认坐骑
|
string dfmount = 4; //默认坐骑
|
||||||
RaceTeamState state = 5; //队伍状态
|
RaceTeamState state = 5; //队伍状态
|
||||||
int32 integral = 6; //积分
|
string currbattid = 6; //当前战斗id
|
||||||
string captainid = 7; //队长id 当前所在队伍
|
int32 integral = 7; //积分
|
||||||
repeated DBRaceInvite invite = 8; //邀请列表
|
string captainid = 8; //队长id 当前所在队伍
|
||||||
repeated DBRaceMember member = 9; //成员列表
|
repeated DBRaceInvite invite = 9; //邀请列表
|
||||||
|
repeated DBRaceMember member = 10; //成员列表
|
||||||
}
|
}
|
||||||
|
|
||||||
//比赛数据
|
//比赛数据
|
||||||
|
@ -13,6 +13,16 @@ message ParkourInfoResp {
|
|||||||
repeated DBParkour recommend = 2;
|
repeated DBParkour recommend = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//变更坐骑请求
|
||||||
|
message ParkourChangeMtsReq {
|
||||||
|
string mtsid = 1;
|
||||||
|
}
|
||||||
|
//变更坐骑请求
|
||||||
|
message ParkourChangeMtsResp {
|
||||||
|
bool issucc = 1;
|
||||||
|
string mtsid = 2;
|
||||||
|
}
|
||||||
|
|
||||||
//推送捕羊大赛用户信息改变
|
//推送捕羊大赛用户信息改变
|
||||||
message ParkourInfoChangePush {
|
message ParkourInfoChangePush {
|
||||||
DBParkour info = 1;
|
DBParkour info = 1;
|
||||||
@ -120,22 +130,25 @@ message ParkourAvoidResp {
|
|||||||
|
|
||||||
//全员冲刺
|
//全员冲刺
|
||||||
message ParkourAllSprintsPush {
|
message ParkourAllSprintsPush {
|
||||||
|
int32 left = 1; //剩余时间
|
||||||
}
|
}
|
||||||
|
|
||||||
//比赛数值变化推送
|
//玩家hp变化通知
|
||||||
message ParkourRaceChanagePush {
|
message ParkourPlayerHPChanagePush {
|
||||||
DBRace race = 1;
|
string uid = 1;
|
||||||
|
int32 hp = 2;
|
||||||
|
}
|
||||||
|
//比赛分值变化
|
||||||
|
message ParkourScoreChanagePush {
|
||||||
|
int32 red = 1;
|
||||||
|
int32 blue = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//比赛
|
//比赛结束通知
|
||||||
message ParkourRaceOverPush {
|
message ParkourRaceOverPush {
|
||||||
DBRace race = 1;
|
int32 winside = 1; //0平局 1 红方胜利 2 蓝方胜利
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///匹配请求 RPC消息定义 服务器自用 客户端不用理会
|
///匹配请求 RPC消息定义 服务器自用 客户端不用理会
|
||||||
message RPCParkourJoinMatchReq {
|
message RPCParkourJoinMatchReq {
|
||||||
string captainid = 1; //队长id
|
string captainid = 1; //队长id
|
||||||
@ -146,6 +159,14 @@ message RPCParkourJoinMatchReq {
|
|||||||
message RPCParkourJoinMatchResp {
|
message RPCParkourJoinMatchResp {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//取消匹配
|
||||||
|
message RPCParkourCancelMatchReq {
|
||||||
|
string captainid = 1; //队长id
|
||||||
|
}
|
||||||
|
message RPCParkourCancelMatchResp {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
///匹配成功通知请求
|
///匹配成功通知请求
|
||||||
message RPCParkourMatchSuccReq {
|
message RPCParkourMatchSuccReq {
|
||||||
repeated DBRaceMember red = 2; //临时红队
|
repeated DBRaceMember red = 2; //临时红队
|
||||||
@ -154,4 +175,14 @@ message RPCParkourMatchSuccReq {
|
|||||||
///匹配成功通知请求
|
///匹配成功通知请求
|
||||||
message RPCParkourMatchSuccResp {
|
message RPCParkourMatchSuccResp {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//托管求情
|
||||||
|
message RPC_ParkourTrusteeshipReq {
|
||||||
|
string battleid = 1;
|
||||||
|
string uid = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RPC_ParkourTrusteeshipResp {
|
||||||
|
|
||||||
}
|
}
|
@ -105,3 +105,13 @@ message PvpInCmdResp {
|
|||||||
message PvpFinishPush {
|
message PvpFinishPush {
|
||||||
string battleid = 1;
|
string battleid = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message RPC_PVPTrusteeshipReq {
|
||||||
|
repeated string battleid = 1;
|
||||||
|
string uid = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RPC_PVPTrusteeshipResp {
|
||||||
|
|
||||||
|
}
|
@ -4,7 +4,7 @@ option go_package = ".;pb";
|
|||||||
message DBReputation {
|
message DBReputation {
|
||||||
string uid = 1; //@go_tags(`bson:"uid"`) 玩家ID
|
string uid = 1; //@go_tags(`bson:"uid"`) 玩家ID
|
||||||
map<int32,Camp> camps = 2; //@go_tags(`bson:"camps"`) key 阵营id
|
map<int32,Camp> camps = 2; //@go_tags(`bson:"camps"`) key 阵营id
|
||||||
CampAttr attrGlobal = 3; //@go_tags(`bson:"attrGlobal"`) 全局阵营属性
|
// CampAttr attrGlobal = 3; //@go_tags(`bson:"attrGlobal"`) 全局阵营属性
|
||||||
}
|
}
|
||||||
|
|
||||||
// 阵营
|
// 阵营
|
||||||
|
@ -1,8 +1,31 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
option go_package = ".;pb";
|
option go_package = ".;pb";
|
||||||
|
import "reputation/reputation_db.proto";
|
||||||
|
|
||||||
message reputationUpgradeReq{
|
//测试
|
||||||
int32 zyId = 1; //阵营ID 1-4
|
message reputationTalenttestReq{
|
||||||
|
int32 raceType =1;
|
||||||
|
int32 friendValue = 2;
|
||||||
|
}
|
||||||
|
message reputationTalenttestResp{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//天赋树升级
|
||||||
|
message reputationUpgradeReq{
|
||||||
|
int32 nodeId = 1; //节点ID
|
||||||
|
}
|
||||||
|
|
||||||
|
message reputationUpgradeResp{}
|
||||||
|
|
||||||
|
//获取天赋树节点
|
||||||
|
message reputationTalentReq{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message reputationTalentResp{
|
||||||
|
CampAttr attrGlobal = 1;
|
||||||
|
Camp camp = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message reputationUpgradeResp{}
|
|
@ -66,6 +66,10 @@ message UserResChangedPush {
|
|||||||
int32 arenacoin = 8; //@go_tags(`bson:"arenacoin`) 竞技场币
|
int32 arenacoin = 8; //@go_tags(`bson:"arenacoin`) 竞技场币
|
||||||
int32 ps = 9; //@go_tags(`bson:"ps"`) 体力
|
int32 ps = 9; //@go_tags(`bson:"ps"`) 体力
|
||||||
int32 moongold = 10; //@go_tags(`bson:"moongold"`) 纯净月髓
|
int32 moongold = 10; //@go_tags(`bson:"moongold"`) 纯净月髓
|
||||||
|
int32 talent1 = 11; //@go_tags(`bson:"talent1"`) 阵营1天赋点
|
||||||
|
int32 talent2 = 12; //@go_tags(`bson:"talent2"`) 阵营2天赋点
|
||||||
|
int32 talent3 = 13; //@go_tags(`bson:"talent3"`) 阵营3天赋点
|
||||||
|
int32 talent4 = 14; //@go_tags(`bson:"talent4"`) 阵营4天赋点
|
||||||
}
|
}
|
||||||
// 玩家在其它终端登录的通知
|
// 玩家在其它终端登录的通知
|
||||||
message UserOtherTermLoginPush { string uid = 1; }
|
message UserOtherTermLoginPush { string uid = 1; }
|
||||||
|
@ -373,4 +373,9 @@ enum ErrorCode {
|
|||||||
//parkour
|
//parkour
|
||||||
ParkourMemberFull = 4401; //队伍成员已满
|
ParkourMemberFull = 4401; //队伍成员已满
|
||||||
ParkourInviteOverdue = 4402; //邀请已过期
|
ParkourInviteOverdue = 4402; //邀请已过期
|
||||||
|
ParkourInviteNoPermissions = 4403; //无权邀请
|
||||||
|
ParkourTargetTeamed = 4404; //目标已组队
|
||||||
|
|
||||||
|
//reputation
|
||||||
|
ReputationTalentFull = 4501; //天赋满级
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,10 @@ enum RaceType {
|
|||||||
|
|
||||||
//队伍状态
|
//队伍状态
|
||||||
enum RaceTeamState {
|
enum RaceTeamState {
|
||||||
teaming = 0; //组队中
|
resting = 0; //休息中
|
||||||
matching = 1; //匹配中
|
teaming = 1; //组队中
|
||||||
raceing = 2; //比赛中
|
matching = 2; //匹配中
|
||||||
|
raceing = 3; //比赛中
|
||||||
}
|
}
|
||||||
|
|
||||||
//队员信息
|
//队员信息
|
||||||
@ -40,10 +41,11 @@ message DBParkour {
|
|||||||
map<string,int32> mounts = 3; //坐骑列表
|
map<string,int32> mounts = 3; //坐骑列表
|
||||||
string dfmount = 4; //默认坐骑
|
string dfmount = 4; //默认坐骑
|
||||||
RaceTeamState state = 5; //队伍状态
|
RaceTeamState state = 5; //队伍状态
|
||||||
int32 integral = 6; //积分
|
string currbattid = 6; //当前战斗id
|
||||||
string captainid = 7; //队长id 当前所在队伍
|
int32 integral = 7; //积分
|
||||||
repeated DBRaceInvite invite = 8; //邀请列表
|
string captainid = 8; //队长id 当前所在队伍
|
||||||
repeated DBRaceMember member = 9; //成员列表
|
repeated DBRaceInvite invite = 9; //邀请列表
|
||||||
|
repeated DBRaceMember member = 10; //成员列表
|
||||||
}
|
}
|
||||||
|
|
||||||
//比赛数据
|
//比赛数据
|
||||||
|
@ -13,6 +13,16 @@ message ParkourInfoResp {
|
|||||||
repeated DBParkour recommend = 2;
|
repeated DBParkour recommend = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//变更坐骑请求
|
||||||
|
message ParkourChangeMtsReq {
|
||||||
|
string mtsid = 1;
|
||||||
|
}
|
||||||
|
//变更坐骑请求
|
||||||
|
message ParkourChangeMtsResp {
|
||||||
|
bool issucc = 1;
|
||||||
|
string mtsid = 2;
|
||||||
|
}
|
||||||
|
|
||||||
//推送捕羊大赛用户信息改变
|
//推送捕羊大赛用户信息改变
|
||||||
message ParkourInfoChangePush {
|
message ParkourInfoChangePush {
|
||||||
DBParkour info = 1;
|
DBParkour info = 1;
|
||||||
@ -120,22 +130,25 @@ message ParkourAvoidResp {
|
|||||||
|
|
||||||
//全员冲刺
|
//全员冲刺
|
||||||
message ParkourAllSprintsPush {
|
message ParkourAllSprintsPush {
|
||||||
|
int32 left = 1; //剩余时间
|
||||||
}
|
}
|
||||||
|
|
||||||
//比赛数值变化推送
|
//玩家hp变化通知
|
||||||
message ParkourRaceChanagePush {
|
message ParkourPlayerHPChanagePush {
|
||||||
DBRace race = 1;
|
string uid = 1;
|
||||||
|
int32 hp = 2;
|
||||||
|
}
|
||||||
|
//比赛分值变化
|
||||||
|
message ParkourScoreChanagePush {
|
||||||
|
int32 red = 1;
|
||||||
|
int32 blue = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//比赛
|
//比赛结束通知
|
||||||
message ParkourRaceOverPush {
|
message ParkourRaceOverPush {
|
||||||
DBRace race = 1;
|
int32 winside = 1; //0平局 1 红方胜利 2 蓝方胜利
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///匹配请求 RPC消息定义 服务器自用 客户端不用理会
|
///匹配请求 RPC消息定义 服务器自用 客户端不用理会
|
||||||
message RPCParkourJoinMatchReq {
|
message RPCParkourJoinMatchReq {
|
||||||
string captainid = 1; //队长id
|
string captainid = 1; //队长id
|
||||||
@ -146,6 +159,14 @@ message RPCParkourJoinMatchReq {
|
|||||||
message RPCParkourJoinMatchResp {
|
message RPCParkourJoinMatchResp {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//取消匹配
|
||||||
|
message RPCParkourCancelMatchReq {
|
||||||
|
string captainid = 1; //队长id
|
||||||
|
}
|
||||||
|
message RPCParkourCancelMatchResp {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
///匹配成功通知请求
|
///匹配成功通知请求
|
||||||
message RPCParkourMatchSuccReq {
|
message RPCParkourMatchSuccReq {
|
||||||
repeated DBRaceMember red = 2; //临时红队
|
repeated DBRaceMember red = 2; //临时红队
|
||||||
@ -154,4 +175,14 @@ message RPCParkourMatchSuccReq {
|
|||||||
///匹配成功通知请求
|
///匹配成功通知请求
|
||||||
message RPCParkourMatchSuccResp {
|
message RPCParkourMatchSuccResp {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//托管求情
|
||||||
|
message RPC_ParkourTrusteeshipReq {
|
||||||
|
string battleid = 1;
|
||||||
|
string uid = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RPC_ParkourTrusteeshipResp {
|
||||||
|
|
||||||
}
|
}
|
@ -105,3 +105,13 @@ message PvpInCmdResp {
|
|||||||
message PvpFinishPush {
|
message PvpFinishPush {
|
||||||
string battleid = 1;
|
string battleid = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message RPC_PVPTrusteeshipReq {
|
||||||
|
repeated string battleid = 1;
|
||||||
|
string uid = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RPC_PVPTrusteeshipResp {
|
||||||
|
|
||||||
|
}
|
@ -4,7 +4,7 @@ option go_package = ".;pb";
|
|||||||
message DBReputation {
|
message DBReputation {
|
||||||
string uid = 1; //@go_tags(`bson:"uid"`) 玩家ID
|
string uid = 1; //@go_tags(`bson:"uid"`) 玩家ID
|
||||||
map<int32,Camp> camps = 2; //@go_tags(`bson:"camps"`) key 阵营id
|
map<int32,Camp> camps = 2; //@go_tags(`bson:"camps"`) key 阵营id
|
||||||
CampAttr attrGlobal = 3; //@go_tags(`bson:"attrGlobal"`) 全局阵营属性
|
// CampAttr attrGlobal = 3; //@go_tags(`bson:"attrGlobal"`) 全局阵营属性
|
||||||
}
|
}
|
||||||
|
|
||||||
// 阵营
|
// 阵营
|
||||||
|
@ -1,8 +1,31 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
option go_package = ".;pb";
|
option go_package = ".;pb";
|
||||||
|
import "reputation_db.proto";
|
||||||
|
|
||||||
message reputationUpgradeReq{
|
//测试
|
||||||
int32 zyId = 1; //阵营ID 1-4
|
message reputationTalenttestReq{
|
||||||
|
int32 raceType =1;
|
||||||
|
int32 friendValue = 2;
|
||||||
|
}
|
||||||
|
message reputationTalenttestResp{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//天赋树升级
|
||||||
|
message reputationUpgradeReq{
|
||||||
|
int32 nodeId = 1; //节点ID
|
||||||
|
}
|
||||||
|
|
||||||
|
message reputationUpgradeResp{}
|
||||||
|
|
||||||
|
//获取天赋树节点
|
||||||
|
message reputationTalentReq{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message reputationTalentResp{
|
||||||
|
CampAttr attrGlobal = 1;
|
||||||
|
Camp camp = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message reputationUpgradeResp{}
|
|
@ -66,6 +66,10 @@ message UserResChangedPush {
|
|||||||
int32 arenacoin = 8; //@go_tags(`bson:"arenacoin`) 竞技场币
|
int32 arenacoin = 8; //@go_tags(`bson:"arenacoin`) 竞技场币
|
||||||
int32 ps = 9; //@go_tags(`bson:"ps"`) 体力
|
int32 ps = 9; //@go_tags(`bson:"ps"`) 体力
|
||||||
int32 moongold = 10; //@go_tags(`bson:"moongold"`) 纯净月髓
|
int32 moongold = 10; //@go_tags(`bson:"moongold"`) 纯净月髓
|
||||||
|
int32 talent1 = 11; //@go_tags(`bson:"talent1"`) 阵营1天赋点
|
||||||
|
int32 talent2 = 12; //@go_tags(`bson:"talent2"`) 阵营2天赋点
|
||||||
|
int32 talent3 = 13; //@go_tags(`bson:"talent3"`) 阵营3天赋点
|
||||||
|
int32 talent4 = 14; //@go_tags(`bson:"talent4"`) 阵营4天赋点
|
||||||
}
|
}
|
||||||
// 玩家在其它终端登录的通知
|
// 玩家在其它终端登录的通知
|
||||||
message UserOtherTermLoginPush { string uid = 1; }
|
message UserOtherTermLoginPush { string uid = 1; }
|
||||||
|
@ -198,6 +198,7 @@ export default defineComponent({
|
|||||||
isshow: true,
|
isshow: true,
|
||||||
showdata: { name: 'liwei1dao', aog: 123 },
|
showdata: { name: 'liwei1dao', aog: 123 },
|
||||||
resultInfo: { li: 123 },
|
resultInfo: { li: 123 },
|
||||||
|
timer: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
@ -327,6 +328,7 @@ export default defineComponent({
|
|||||||
this.connecting = false
|
this.connecting = false
|
||||||
this.pushlog('success', `连接创建成功`)
|
this.pushlog('success', `连接创建成功`)
|
||||||
socket.closelisten = this.closelisten
|
socket.closelisten = this.closelisten
|
||||||
|
this.timer = setInterval(this.heartbeat, 30000)
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.error = true
|
this.error = true
|
||||||
@ -343,6 +345,26 @@ export default defineComponent({
|
|||||||
this.isconnect = false
|
this.isconnect = false
|
||||||
this.subSelect = null
|
this.subSelect = null
|
||||||
this.reqproto = []
|
this.reqproto = []
|
||||||
|
clearInterval(this.timer)
|
||||||
|
},
|
||||||
|
heartbeat() {
|
||||||
|
let protoobj = proto.lookup('GatewayHeartbeatReq')
|
||||||
|
let message = proto.lookup('UserMessage')
|
||||||
|
let any = proto.lookup('google.protobuf.Any')
|
||||||
|
message.MainType = 'gateway'
|
||||||
|
message.SubType = 'heartbeat'
|
||||||
|
message.data = any.create({
|
||||||
|
type_url: `type.googleapis.com/GatewayHeartbeatReq`,
|
||||||
|
value: proto.lookup('GatewayHeartbeatReq').encode(protoobj).finish(), // Or as packed buffer
|
||||||
|
})
|
||||||
|
// if (this.subSelect.reqName == 'UserLoginReq') {
|
||||||
|
// //登录协议特殊处理
|
||||||
|
// message.sec = this.buildsecStr(protoobj.account, protoobj.sid)
|
||||||
|
// } else {
|
||||||
|
// message.sec = this.buildsecStr()
|
||||||
|
// }
|
||||||
|
let buffer = proto.lookup('UserMessage').encode(message).finish()
|
||||||
|
socket.send(buffer)
|
||||||
},
|
},
|
||||||
mainSelectUpdate(v) {
|
mainSelectUpdate(v) {
|
||||||
console.log(v)
|
console.log(v)
|
||||||
@ -431,6 +453,9 @@ export default defineComponent({
|
|||||||
let mainType = message.MainType
|
let mainType = message.MainType
|
||||||
let subType = message.SubType
|
let subType = message.SubType
|
||||||
let iskeep = false
|
let iskeep = false
|
||||||
|
if (mainType == 'gateway' && subType == 'heartbeat') {
|
||||||
|
return
|
||||||
|
}
|
||||||
console.log('接收到消息 message', message)
|
console.log('接收到消息 message', message)
|
||||||
for (const v of this.proto_models) {
|
for (const v of this.proto_models) {
|
||||||
if (v.mainType == mainType) {
|
if (v.mainType == mainType) {
|
||||||
|
Loading…
Reference in New Issue
Block a user