1
This commit is contained in:
parent
69183b3db8
commit
91f03316a2
@ -1,4 +1,5 @@
|
|||||||
const axios = require('axios').default;
|
const axios = require('axios').default;
|
||||||
|
const protobuf = require('protobufjs');
|
||||||
|
|
||||||
function get(url, params) {
|
function get(url, params) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
@ -23,6 +24,9 @@ function get(url, params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function start() {
|
async function start() {
|
||||||
|
const fiendMsg = await protobuf.load('proto/friend/cs_proto.proto');
|
||||||
|
const fiendMsgId = await protobuf.load('proto/friend/cs_msgid.proto');
|
||||||
|
console.log(friendMsg, friendMsgId);
|
||||||
const {err, response} = await get(
|
const {err, response} = await get(
|
||||||
'https://login-z2-test.cebg.games/webapp/index.php',
|
'https://login-z2-test.cebg.games/webapp/index.php',
|
||||||
{
|
{
|
||||||
|
189
scripts/check_server/package-lock.json
generated
189
scripts/check_server/package-lock.json
generated
@ -1,13 +1,81 @@
|
|||||||
{
|
{
|
||||||
"name": "check_server",
|
"name": "check_server",
|
||||||
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
|
"name": "check_server",
|
||||||
|
"version": "1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.27.0"
|
"axios": "^0.27.0",
|
||||||
|
"protobufjs": "^6.11.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@protobufjs/aspromise": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
|
||||||
|
"integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78="
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/base64": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/codegen": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg=="
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/eventemitter": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A="
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/fetch": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=",
|
||||||
|
"dependencies": {
|
||||||
|
"@protobufjs/aspromise": "^1.1.1",
|
||||||
|
"@protobufjs/inquire": "^1.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/float": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E="
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/inquire": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik="
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/path": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
|
||||||
|
"integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0="
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/pool": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q="
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/utf8": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA="
|
||||||
|
},
|
||||||
|
"node_modules/@types/long": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w=="
|
||||||
|
},
|
||||||
|
"node_modules/@types/node": {
|
||||||
|
"version": "17.0.27",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.27.tgz",
|
||||||
|
"integrity": "sha512-4/Ke7bbWOasuT3kceBZFGakP1dYN2XFd8v2l9bqF2LNWrmeU07JLpp56aEeG6+Q3olqO5TvXpW0yaiYnZJ5CXg=="
|
||||||
|
},
|
||||||
"node_modules/asynckit": {
|
"node_modules/asynckit": {
|
||||||
"version": "0.4.0",
|
"version": "0.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||||
@ -73,6 +141,11 @@
|
|||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/long": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
|
||||||
|
},
|
||||||
"node_modules/mime-db": {
|
"node_modules/mime-db": {
|
||||||
"version": "1.52.0",
|
"version": "1.52.0",
|
||||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
||||||
@ -91,9 +164,98 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"node_modules/protobufjs": {
|
||||||
|
"version": "6.11.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.2.tgz",
|
||||||
|
"integrity": "sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw==",
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@protobufjs/aspromise": "^1.1.2",
|
||||||
|
"@protobufjs/base64": "^1.1.2",
|
||||||
|
"@protobufjs/codegen": "^2.0.4",
|
||||||
|
"@protobufjs/eventemitter": "^1.1.0",
|
||||||
|
"@protobufjs/fetch": "^1.1.0",
|
||||||
|
"@protobufjs/float": "^1.0.2",
|
||||||
|
"@protobufjs/inquire": "^1.1.0",
|
||||||
|
"@protobufjs/path": "^1.1.2",
|
||||||
|
"@protobufjs/pool": "^1.1.0",
|
||||||
|
"@protobufjs/utf8": "^1.1.0",
|
||||||
|
"@types/long": "^4.0.1",
|
||||||
|
"@types/node": ">=13.7.0",
|
||||||
|
"long": "^4.0.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"pbjs": "bin/pbjs",
|
||||||
|
"pbts": "bin/pbts"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@protobufjs/aspromise": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
|
||||||
|
"integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78="
|
||||||
|
},
|
||||||
|
"@protobufjs/base64": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="
|
||||||
|
},
|
||||||
|
"@protobufjs/codegen": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg=="
|
||||||
|
},
|
||||||
|
"@protobufjs/eventemitter": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A="
|
||||||
|
},
|
||||||
|
"@protobufjs/fetch": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=",
|
||||||
|
"requires": {
|
||||||
|
"@protobufjs/aspromise": "^1.1.1",
|
||||||
|
"@protobufjs/inquire": "^1.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@protobufjs/float": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E="
|
||||||
|
},
|
||||||
|
"@protobufjs/inquire": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik="
|
||||||
|
},
|
||||||
|
"@protobufjs/path": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
|
||||||
|
"integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0="
|
||||||
|
},
|
||||||
|
"@protobufjs/pool": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q="
|
||||||
|
},
|
||||||
|
"@protobufjs/utf8": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA="
|
||||||
|
},
|
||||||
|
"@types/long": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w=="
|
||||||
|
},
|
||||||
|
"@types/node": {
|
||||||
|
"version": "17.0.27",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.27.tgz",
|
||||||
|
"integrity": "sha512-4/Ke7bbWOasuT3kceBZFGakP1dYN2XFd8v2l9bqF2LNWrmeU07JLpp56aEeG6+Q3olqO5TvXpW0yaiYnZJ5CXg=="
|
||||||
|
},
|
||||||
"asynckit": {
|
"asynckit": {
|
||||||
"version": "0.4.0",
|
"version": "0.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||||
@ -136,6 +298,11 @@
|
|||||||
"mime-types": "^2.1.12"
|
"mime-types": "^2.1.12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"long": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
|
||||||
|
},
|
||||||
"mime-db": {
|
"mime-db": {
|
||||||
"version": "1.52.0",
|
"version": "1.52.0",
|
||||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
||||||
@ -148,6 +315,26 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"mime-db": "1.52.0"
|
"mime-db": "1.52.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"protobufjs": {
|
||||||
|
"version": "6.11.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.2.tgz",
|
||||||
|
"integrity": "sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw==",
|
||||||
|
"requires": {
|
||||||
|
"@protobufjs/aspromise": "^1.1.2",
|
||||||
|
"@protobufjs/base64": "^1.1.2",
|
||||||
|
"@protobufjs/codegen": "^2.0.4",
|
||||||
|
"@protobufjs/eventemitter": "^1.1.0",
|
||||||
|
"@protobufjs/fetch": "^1.1.0",
|
||||||
|
"@protobufjs/float": "^1.0.2",
|
||||||
|
"@protobufjs/inquire": "^1.1.0",
|
||||||
|
"@protobufjs/path": "^1.1.2",
|
||||||
|
"@protobufjs/pool": "^1.1.0",
|
||||||
|
"@protobufjs/utf8": "^1.1.0",
|
||||||
|
"@types/long": "^4.0.1",
|
||||||
|
"@types/node": ">=13.7.0",
|
||||||
|
"long": "^4.0.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {},
|
"scripts": {},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.27.0"
|
"axios": "^0.27.0",
|
||||||
|
"protobufjs": "^6.11.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
62
scripts/check_server/proto/battle/cs_msgid.proto
Normal file
62
scripts/check_server/proto/battle/cs_msgid.proto
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
package cs;
|
||||||
|
|
||||||
|
//消息id定义
|
||||||
|
enum CMMessageId_e
|
||||||
|
{
|
||||||
|
_CMPing = 101;
|
||||||
|
|
||||||
|
_CMJoin = 103;
|
||||||
|
_CMReconnect = 104;
|
||||||
|
_CMMove = 201;
|
||||||
|
_CMEmote = 204;
|
||||||
|
_CMVoice = 206;
|
||||||
|
_CMGameOver = 207;
|
||||||
|
_CMWatchWar = 208;
|
||||||
|
_CMLeave = 209;
|
||||||
|
_CMRevive = 210;
|
||||||
|
_CMCancelRevive = 211;
|
||||||
|
_CMAdStart = 212;
|
||||||
|
_CMAdCancel = 213;
|
||||||
|
_CMAdEnd = 214;
|
||||||
|
_CMGetBoxInfo = 215;
|
||||||
|
_CMOpenBox = 216;
|
||||||
|
_CMExecCommand = 217;
|
||||||
|
_CMMatchCancel = 218;
|
||||||
|
_CMMatchChoose = 219;
|
||||||
|
_CMMatchStartGame = 220;
|
||||||
|
_CMMatchCancelStartGame = 221;
|
||||||
|
_CMMatchSendMsg = 222;
|
||||||
|
_CMMatchBroadcastMsg = 223;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum SMMessageId_e
|
||||||
|
{
|
||||||
|
_SMPing = 101;
|
||||||
|
_SMRpcError = 102;
|
||||||
|
_SMReconnect = 104;
|
||||||
|
|
||||||
|
_SMWatchWar = 208;
|
||||||
|
_SMLeave = 209;
|
||||||
|
_SMGetBoxInfo = 216;
|
||||||
|
_SMOpenBox = 217;
|
||||||
|
|
||||||
|
_SMJoinedNotify = 103;
|
||||||
|
_SMMapInfo = 1002;
|
||||||
|
_SMPlayerInfo = 1003;
|
||||||
|
_SMUpdate = 1004;
|
||||||
|
_SMRollMsg = 1005;
|
||||||
|
_SMPickup = 1006;
|
||||||
|
_SMVoiceNotify = 1007;
|
||||||
|
_SMDisconnectNotify = 1008;
|
||||||
|
_SMGameOver = 1009;
|
||||||
|
_SMDebugMsg = 1010;
|
||||||
|
_SMWxVoip = 1011;
|
||||||
|
_SMUiUpdate = 1012;
|
||||||
|
_SMGameStart = 1013;
|
||||||
|
_SMSysPiaoMsg = 1014;
|
||||||
|
_SMShowCountdown = 1015;
|
||||||
|
_SMShowTeamUI = 1016;
|
||||||
|
_SMUpdateMatchInfo = 1017;
|
||||||
|
_SMGetItemNotify = 1018;
|
||||||
|
_SMMatchMemberMsgNotify = 1019;
|
||||||
|
}
|
1378
scripts/check_server/proto/battle/cs_proto.proto
Executable file
1378
scripts/check_server/proto/battle/cs_proto.proto
Executable file
File diff suppressed because it is too large
Load Diff
132
scripts/check_server/proto/friend/cs_msgid.proto
Normal file
132
scripts/check_server/proto/friend/cs_msgid.proto
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
package cs;
|
||||||
|
|
||||||
|
//消息id定义
|
||||||
|
enum CMMessageId_e
|
||||||
|
{
|
||||||
|
_CMPing = 101;
|
||||||
|
|
||||||
|
_CMLogin = 103;
|
||||||
|
|
||||||
|
_CMFriendInvite = 105;
|
||||||
|
_CMFriendAgree = 106;
|
||||||
|
_CMFriendDelete = 108;
|
||||||
|
_CMFriendApply = 109;
|
||||||
|
_CMFriendApplyList = 110;
|
||||||
|
_CMFriendBlackList = 111;
|
||||||
|
_CMFriendAddBlack = 112;
|
||||||
|
_CMFriendDeleteBlack = 113;
|
||||||
|
_CMFriendRefuse = 114;
|
||||||
|
_CMFriendList = 115;
|
||||||
|
_CMQueryUserStatus = 116;
|
||||||
|
_CMRecommandFriend = 117;
|
||||||
|
_CMFriendIdList = 118;
|
||||||
|
|
||||||
|
_CMSendChatMsg = 151;
|
||||||
|
_CMSendCustomMsg = 152;
|
||||||
|
_CMUpdateTempCustomData = 153;
|
||||||
|
_CMUpdateUserInfo = 154;
|
||||||
|
_CMDirtyWordCheck = 155;
|
||||||
|
_CMGetUserGuild = 156;
|
||||||
|
_CMReadMsgAndOpenChatNotify = 157;
|
||||||
|
_CMCloseChatNotify = 158;
|
||||||
|
_CMSetCurrPrivateChatTarget = 159;
|
||||||
|
|
||||||
|
_CMGuildMsgBegin = 230;
|
||||||
|
_CMGuildCreate = 231;
|
||||||
|
_CMGuildJoin = 232;
|
||||||
|
_CMGuildAgree = 233;
|
||||||
|
_CMGuildKick = 234;
|
||||||
|
_CMGuildQuit = 235;
|
||||||
|
_CMGuildDismiss = 236;
|
||||||
|
_CMGuildChange = 237;
|
||||||
|
_CMGuildInfo = 238;
|
||||||
|
_CMGuildSearch = 239;
|
||||||
|
_CMGuildRank = 240;
|
||||||
|
_CMGuildMemberList = 241;
|
||||||
|
_CMGuildApplyList = 242;
|
||||||
|
_CMGuildLog = 243;
|
||||||
|
_CMGuildMemberSetJob = 244;
|
||||||
|
_CMGuildRefuse = 245;
|
||||||
|
_CMGuildAgreeInvite = 246;
|
||||||
|
_CMGuildGainExp = 247;
|
||||||
|
_CMGuildSearchMember = 248;
|
||||||
|
_CMGuildMsgEnd = 270;
|
||||||
|
|
||||||
|
_CMTeamCreate = 301;
|
||||||
|
_CMTeamJoin = 302;
|
||||||
|
_CMTeamAgree = 303;
|
||||||
|
_CMTeamKick = 304;
|
||||||
|
_CMTeamQuit = 305;
|
||||||
|
_CMTeamDismiss = 306;
|
||||||
|
_CMTeamRename = 307;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
enum SMMessageId_e
|
||||||
|
{
|
||||||
|
_SMPing = 101;
|
||||||
|
_SMRpcError = 102;
|
||||||
|
|
||||||
|
_SMLogin = 103;
|
||||||
|
|
||||||
|
_SMFriendInvite = 105;
|
||||||
|
_SMFriendAgree = 106;
|
||||||
|
_SMFriendDelete = 108;
|
||||||
|
_SMFriendApply = 109;
|
||||||
|
_SMFriendApplyList = 110;
|
||||||
|
_SMFriendBlackList = 111;
|
||||||
|
_SMFriendAddBlack = 112;
|
||||||
|
_SMFriendDeleteBlack = 113;
|
||||||
|
_SMFriendRefuse = 114;
|
||||||
|
_SMFriendList = 115;
|
||||||
|
_SMQueryUserStatus = 116;
|
||||||
|
_SMRecommandFriend = 117;
|
||||||
|
_SMFriendIdList = 118;
|
||||||
|
|
||||||
|
_SMDirtyWordCheck = 155;
|
||||||
|
_SMGetUserGuild = 156;
|
||||||
|
|
||||||
|
_SMGuildMsgBegin = 230;
|
||||||
|
_SMGuildCreate = 231;
|
||||||
|
_SMGuildJoin = 232;
|
||||||
|
_SMGuildAgree = 233;
|
||||||
|
_SMGuildKick = 234;
|
||||||
|
_SMGuildQuit = 235;
|
||||||
|
_SMGuildDismiss = 236;
|
||||||
|
_SMGuildChange = 237;
|
||||||
|
_SMGuildInfo = 238;
|
||||||
|
_SMGuildSearch = 239;
|
||||||
|
_SMGuildRank = 240;
|
||||||
|
_SMGuildMemberList = 241;
|
||||||
|
_SMGuildApplyList = 242;
|
||||||
|
_SMGuildLog = 243;
|
||||||
|
_SMGuildMemberSetJob = 244;
|
||||||
|
_SMGuildRefuse = 245;
|
||||||
|
_SMGuildAgreeInvite = 246;
|
||||||
|
_SMGuildGainExp = 247;
|
||||||
|
_SMGuildSearchMember = 248;
|
||||||
|
_SMGuildMsgEnd = 270;
|
||||||
|
|
||||||
|
_SMTeamCreate = 301;
|
||||||
|
_SMTeamJoin = 302;
|
||||||
|
_SMTeamAgree = 303;
|
||||||
|
_SMTeamKick = 304;
|
||||||
|
_SMTeamQuit = 305;
|
||||||
|
_SMTeamDismiss = 306;
|
||||||
|
_SMTeamRename = 307;
|
||||||
|
|
||||||
|
_SMUserStatusNotify = 501;
|
||||||
|
_SMUserInfoUpdate = 502;
|
||||||
|
_SMCustomMsgNotify = 503;
|
||||||
|
_SMUserTempCustomDataUpdate = 504;
|
||||||
|
_SMDeleteFriendNotify = 505;
|
||||||
|
_SMUpdateAccountInfo = 506;
|
||||||
|
_SMUpdateRedPointNotify = 507;
|
||||||
|
_SMShowErrorMsg = 508;
|
||||||
|
_SMAddBlackListNotify = 509;
|
||||||
|
_SMDeleteBlackListNotify = 510;
|
||||||
|
_SMUpdateChatRedPointNotify = 511;
|
||||||
|
_SMUpdateChatChannelLastId = 512;
|
||||||
|
_SMUpdatePrivateChatRedPointNotify = 513;
|
||||||
|
_SMChatMsgNotify = 514;
|
||||||
|
}
|
856
scripts/check_server/proto/friend/cs_proto.proto
Normal file
856
scripts/check_server/proto/friend/cs_proto.proto
Normal file
@ -0,0 +1,856 @@
|
|||||||
|
package cs;
|
||||||
|
|
||||||
|
//常量
|
||||||
|
enum Constant_e
|
||||||
|
{
|
||||||
|
ProtoVersion = 2020061101; //协议版本
|
||||||
|
}
|
||||||
|
|
||||||
|
//心跳(每60秒上报)
|
||||||
|
message CMPing
|
||||||
|
{
|
||||||
|
}
|
||||||
|
message SMPing
|
||||||
|
{
|
||||||
|
optional int32 param1 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//string元组
|
||||||
|
message MFStringTuple
|
||||||
|
{
|
||||||
|
repeated string values = 1; //values
|
||||||
|
}
|
||||||
|
|
||||||
|
//int32 pair
|
||||||
|
message MFPairInt32
|
||||||
|
{
|
||||||
|
optional int32 key = 1; //key
|
||||||
|
optional int32 val = 2; //val
|
||||||
|
}
|
||||||
|
|
||||||
|
//int64 pair
|
||||||
|
message MFPairInt64
|
||||||
|
{
|
||||||
|
optional int64 key = 1; //key
|
||||||
|
optional int64 val = 2; //val
|
||||||
|
}
|
||||||
|
|
||||||
|
//分页信息
|
||||||
|
message MFPaging
|
||||||
|
{
|
||||||
|
optional int32 curr_page = 1; //当前页(第一页是0)
|
||||||
|
optional int32 page_size = 2; //每页记录数
|
||||||
|
optional int32 _total_page = 3; //总页数(服务器填充该字段)
|
||||||
|
optional int32 _total_count = 4; //总记录数(服务器填充该字段)
|
||||||
|
}
|
||||||
|
|
||||||
|
//用户基础数据(可用于缓存,除下划线开头的字段会存储到db)
|
||||||
|
message MFBaseUserData
|
||||||
|
{
|
||||||
|
optional string account_id = 1; //账号id
|
||||||
|
optional string nickname = 2; //昵称
|
||||||
|
optional string avatar_url = 3; //头像
|
||||||
|
optional int32 sex = 4; //性别 1:男 2:女 0:未知
|
||||||
|
optional int32 last_login_time = 5; //最后登录时间
|
||||||
|
optional int64 guild_id = 6; //工会id(没有公会的话为0)
|
||||||
|
optional int32 guild_job = 7; //公会职位 1:公会长 2:副公会长 3:精英成员 其他(0):普通会员
|
||||||
|
optional int32 vip_lv = 8 [default = 0]; //性别
|
||||||
|
optional int32 head = 9 [default = 0]; //头像框
|
||||||
|
optional int32 contribute = 10 [default = 0]; //贡献度
|
||||||
|
|
||||||
|
optional int64 user_value1 = 50; //用户字段1
|
||||||
|
optional int64 user_value2 = 51; //用户字段2
|
||||||
|
optional int64 user_value3 = 52; //用户字段3
|
||||||
|
optional int64 base_data_version = 100; //数据版本号
|
||||||
|
|
||||||
|
optional int32 _online = 101; //是否在线
|
||||||
|
}
|
||||||
|
|
||||||
|
//临时用户自定义数据(不会存储每次上/下线时时都重置为0)
|
||||||
|
message MFUserTempCustomData
|
||||||
|
{
|
||||||
|
optional int64 value1 = 1 [default = 0]; //自定义字段1
|
||||||
|
optional int64 value2 = 2 [default = 0]; //自定义字段2
|
||||||
|
optional int64 value3 = 3 [default = 0]; //自定义字段3
|
||||||
|
}
|
||||||
|
|
||||||
|
//账号信息(自己)
|
||||||
|
message MFAccountInfo
|
||||||
|
{
|
||||||
|
optional MFUserInfo user_info = 1; //用户数据
|
||||||
|
optional string user_sign = 2; //用户签名用于接口确权
|
||||||
|
}
|
||||||
|
|
||||||
|
//用户信息
|
||||||
|
message MFUserInfo
|
||||||
|
{
|
||||||
|
optional MFBaseUserData base_data = 1; //基础数据
|
||||||
|
optional MFUserTempCustomData temp_custom_data = 2; //临时用户自定义数据
|
||||||
|
optional int32 is_sys_user = 3; //是否系统用户(主要在聊天时判断)
|
||||||
|
}
|
||||||
|
|
||||||
|
//用户状态
|
||||||
|
message MFUserStatus
|
||||||
|
{
|
||||||
|
optional string account_id = 1; //账号id
|
||||||
|
optional int32 _online = 2; //是否在线
|
||||||
|
optional MFUserTempCustomData temp_custom_data = 3; //临时用户自定义数据
|
||||||
|
}
|
||||||
|
|
||||||
|
//好友申请
|
||||||
|
message MFFriendApply
|
||||||
|
{
|
||||||
|
optional int64 idx = 1; //唯一索引id
|
||||||
|
optional int64 applyid = 2; //applyid
|
||||||
|
optional string target_id = 3; //target_id
|
||||||
|
optional MFBaseUserData base_data = 4; //基础数据
|
||||||
|
}
|
||||||
|
|
||||||
|
//公会申请
|
||||||
|
message MFGuildApply
|
||||||
|
{
|
||||||
|
optional int64 idx = 1; //唯一索引id
|
||||||
|
optional int64 applyid = 2; //applyid
|
||||||
|
optional int64 guild_id = 3; //guild_id
|
||||||
|
optional MFBaseUserData base_data = 4; //基础数据
|
||||||
|
}
|
||||||
|
|
||||||
|
//公会基本信息
|
||||||
|
message MFGuildBasic
|
||||||
|
{
|
||||||
|
optional int64 guild_id = 1; //公会id
|
||||||
|
optional string guild_name = 2; //公会名
|
||||||
|
optional int32 guild_lv = 3; //公会等级
|
||||||
|
optional double guild_exp = 4; //公会经验
|
||||||
|
optional int32 guild_badge = 5; //公会徽章
|
||||||
|
optional int32 member_num = 6; //公会成员数
|
||||||
|
optional string guild_declaration = 7; //公会宣言
|
||||||
|
optional string owner_id = 8; //公会队长id
|
||||||
|
optional string owner_name = 9; //公会队长名字
|
||||||
|
optional string owner_avatar_url = 10; //公会队长头像
|
||||||
|
optional int32 owner_sex = 23; //公会队长性别
|
||||||
|
optional int32 owner_vip_lv = 12 [default = 0]; //vip等级
|
||||||
|
optional int32 owner_head = 13 [default = 0]; //头像框
|
||||||
|
optional int32 join_unlimited = 11; //不限制加入
|
||||||
|
optional int32 join_cond1 = 20; //加入条件1
|
||||||
|
optional int32 join_cond2 = 21; //加入条件2
|
||||||
|
optional int32 applyed = 22; //是否已申请
|
||||||
|
|
||||||
|
optional int32 _gameid = 100; //gameid
|
||||||
|
optional int32 _channel = 101; //channel
|
||||||
|
optional int32 _createtime = 102; //createtime
|
||||||
|
optional int32 _modifytime = 103; //modifytime
|
||||||
|
optional int64 _name_ext1 = 104; //name_ext1
|
||||||
|
optional int64 _name_ext2 = 105; //name_ext2
|
||||||
|
optional int64 _guild_status = 106; //guild_status
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//聊天消息
|
||||||
|
message MFChatMsg
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
消息唯一id,递增序列,客户端可以用chat_channel + msg_uuid作为主键
|
||||||
|
!!!不同的频道msg_uuid可能重复
|
||||||
|
*/
|
||||||
|
optional int64 msg_uuid = 1;
|
||||||
|
optional MFUserInfo sender = 2; //发送者
|
||||||
|
optional MFUserInfo receiver = 3; //接收者
|
||||||
|
optional int32 chat_channel = 4; //聊天频道
|
||||||
|
optional int32 msg_type = 5; //消息类型 0:文本消息(json) 1:自定义协议 (json) 2:纯文本(但是任会做屏蔽字替换)
|
||||||
|
optional string msg_body = 6; //消息内容(json类型里的字段!开头的会做屏蔽替换)
|
||||||
|
optional int32 send_time = 7; //消息发送时间
|
||||||
|
}
|
||||||
|
|
||||||
|
//登录好友服
|
||||||
|
message CMLoginCommonHead
|
||||||
|
{
|
||||||
|
optional int32 server_id = 1; //保留
|
||||||
|
}
|
||||||
|
message CMLoginOld
|
||||||
|
{
|
||||||
|
optional string account_id = 3; //账号id
|
||||||
|
optional string session_id = 20; //sessionid
|
||||||
|
optional string nickname = 4; //昵称
|
||||||
|
optional string avatar_url = 5; //头像
|
||||||
|
optional int32 sex = 6; //性别
|
||||||
|
}
|
||||||
|
message CMLogin
|
||||||
|
{
|
||||||
|
optional int32 server_id = 1; //保留(定死传1)
|
||||||
|
optional string reserved2 = 2; //保留
|
||||||
|
optional string account_id = 3; //账号id
|
||||||
|
optional string session_id = 20; //sessionid
|
||||||
|
optional string nickname = 4; //昵称
|
||||||
|
optional int32 proto_version = 5; //协议版本号Constant_e.ProtoVersion
|
||||||
|
optional int32 sex = 6; //性别
|
||||||
|
optional string avatar_url = 7; //头像
|
||||||
|
optional int32 vip_lv = 8; //性别
|
||||||
|
optional int32 head = 9; //头像框
|
||||||
|
}
|
||||||
|
|
||||||
|
//登录回复
|
||||||
|
message SMLogin
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
optional MFAccountInfo account_info = 3; //账号信息
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新用户信息(增量更新,不需更新的字段不传即可)
|
||||||
|
message CMUpdateUserInfo
|
||||||
|
{
|
||||||
|
optional string nickname = 2; //昵称
|
||||||
|
optional string avatar_url = 3; //头像
|
||||||
|
optional int32 sex = 4; //性别 1:男 2:女 0:未知
|
||||||
|
optional int32 vip_lv = 8; //性别
|
||||||
|
optional int32 head = 9; //头像框
|
||||||
|
optional int32 contribute = 10; //贡献度
|
||||||
|
|
||||||
|
optional int64 user_value1 = 50; //用户字段1
|
||||||
|
optional int64 user_value2 = 51; //用户字段2
|
||||||
|
optional int64 user_value3 = 52; //用户字段3
|
||||||
|
|
||||||
|
optional int32 delay_time = 100; //延迟更新(单位毫秒)
|
||||||
|
optional int32 delay_flag = 101; //延迟更新标志(只能为1-16),相同的flag定时器覆盖
|
||||||
|
}
|
||||||
|
|
||||||
|
//屏蔽字检查
|
||||||
|
message CMDirtyWordCheck
|
||||||
|
{
|
||||||
|
optional string text = 2; //待检查文本
|
||||||
|
}
|
||||||
|
//屏蔽字检查回复
|
||||||
|
message SMDirtyWordCheck
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误消息
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取自己的公会信息
|
||||||
|
message CMGetUserGuild
|
||||||
|
{
|
||||||
|
optional string account_id = 1; //用户id,传空或不传获取自己
|
||||||
|
}
|
||||||
|
//获取自己
|
||||||
|
message SMGetUserGuild
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //1:公会不存在
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
optional string account_id = 3; //用户id,传空或不传获取自己
|
||||||
|
optional int64 guild_id = 4; //工会id(没有公会的话为0)
|
||||||
|
optional int32 guild_job = 5; //公会职位 1:公会长 2:副公会长 3:精英成员 其他(0):普通会员
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取好友列表
|
||||||
|
message CMFriendList
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//好友列表回复
|
||||||
|
message SMFriendList
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误消息
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
repeated MFUserInfo friend_list = 3; //好友列表
|
||||||
|
}
|
||||||
|
|
||||||
|
//好友申请
|
||||||
|
message CMFriendApply
|
||||||
|
{
|
||||||
|
optional string friend_id = 1; //好友id
|
||||||
|
optional string msg = 2; //消息
|
||||||
|
}
|
||||||
|
//好友申请回复
|
||||||
|
message SMFriendApply
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //1:已经是好友
|
||||||
|
optional string errmsg = 2; //消息描述
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取好友申请列表
|
||||||
|
message CMFriendApplyList
|
||||||
|
{
|
||||||
|
optional MFPaging paging = 1; //分页信息
|
||||||
|
}
|
||||||
|
//获取好友申请列表回复
|
||||||
|
message SMFriendApplyList
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
optional MFPaging paging = 3; //分页信息回传
|
||||||
|
repeated MFFriendApply apply_list = 4; //申请加好友列表
|
||||||
|
}
|
||||||
|
|
||||||
|
//同意申请
|
||||||
|
message CMFriendAgree
|
||||||
|
{
|
||||||
|
optional MFFriendApply apply = 1; //申请信息
|
||||||
|
}
|
||||||
|
//同意申请回复
|
||||||
|
message SMFriendAgree
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
}
|
||||||
|
|
||||||
|
//拒绝好友申请
|
||||||
|
message CMFriendRefuse
|
||||||
|
{
|
||||||
|
optional MFFriendApply apply = 1; //申请信息
|
||||||
|
}
|
||||||
|
//拒绝好友申请回复
|
||||||
|
message SMFriendRefuse
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除好友
|
||||||
|
message CMFriendDelete
|
||||||
|
{
|
||||||
|
optional string friend_id = 1; //好友id
|
||||||
|
}
|
||||||
|
//删除好友回复
|
||||||
|
message SMFriendDelete
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
optional string friend_id = 3; //好友id
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取黑名单
|
||||||
|
message CMFriendBlackList
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//获取黑名单回复
|
||||||
|
message SMFriendBlackList
|
||||||
|
{
|
||||||
|
repeated MFUserInfo black_list = 1; //黑名单
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加黑名单
|
||||||
|
message CMFriendAddBlack
|
||||||
|
{
|
||||||
|
optional MFUserInfo user_info = 1; //好友信息
|
||||||
|
}
|
||||||
|
//添加黑名单回复
|
||||||
|
message SMFriendAddBlack
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除黑名单
|
||||||
|
message CMFriendDeleteBlack
|
||||||
|
{
|
||||||
|
optional string account_id = 1; //好友id
|
||||||
|
}
|
||||||
|
//删除黑名单回复
|
||||||
|
message SMFriendDeleteBlack
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取好友/黑名单id列表
|
||||||
|
message CMFriendIdList
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//获取好友/黑名单id列表回复
|
||||||
|
message SMFriendIdList
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
repeated string friends = 3; //好友
|
||||||
|
repeated string blacklist = 4; //黑名单
|
||||||
|
}
|
||||||
|
|
||||||
|
//建群
|
||||||
|
message CMTeamCreate
|
||||||
|
{
|
||||||
|
optional string team_name = 1; //群名称
|
||||||
|
}
|
||||||
|
//建群返回
|
||||||
|
message SMTeamCreate
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //1:群已存在 2: 你已经有群
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
}
|
||||||
|
|
||||||
|
//加群
|
||||||
|
message CMTeamJoin
|
||||||
|
{
|
||||||
|
optional int64 team_id = 1; //群id
|
||||||
|
}
|
||||||
|
//加群返回
|
||||||
|
message SMTeamJoin
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //1:群id不存在 2:群已满
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
}
|
||||||
|
|
||||||
|
//同意加群
|
||||||
|
message CMTeamAgree
|
||||||
|
{
|
||||||
|
}
|
||||||
|
message SMTeamAgree
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1;
|
||||||
|
optional string errmsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
//踢人
|
||||||
|
message CMTeamKick
|
||||||
|
{
|
||||||
|
optional string account_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//踢人回复
|
||||||
|
message SMTeamKick
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //1:群id错误
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
}
|
||||||
|
|
||||||
|
//退群
|
||||||
|
message CMTeamQuit
|
||||||
|
{
|
||||||
|
}
|
||||||
|
message SMTeamQuit
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
}
|
||||||
|
|
||||||
|
//解散群
|
||||||
|
message CMTeamDismiss
|
||||||
|
{
|
||||||
|
}
|
||||||
|
message SMTeamDismiss
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
}
|
||||||
|
|
||||||
|
//群改名
|
||||||
|
message CMTeamRename
|
||||||
|
{
|
||||||
|
optional string new_team_name = 1; //新群名
|
||||||
|
}
|
||||||
|
message SMTeamRename
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取公会信息
|
||||||
|
message CMGuildInfo
|
||||||
|
{
|
||||||
|
optional int64 guild_id = 1; //公会id
|
||||||
|
}
|
||||||
|
//获取公会信息返回
|
||||||
|
message SMGuildInfo
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //1:公会不存在
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
optional MFGuildBasic info = 3; //公会信息
|
||||||
|
}
|
||||||
|
|
||||||
|
//建公会
|
||||||
|
message CMGuildCreate
|
||||||
|
{
|
||||||
|
optional string guild_name = 1; //公会名字
|
||||||
|
optional int32 guild_badge = 2; //公会徽标
|
||||||
|
optional string guild_declaration = 3; //公会徽标
|
||||||
|
optional int32 join_unlimited = 4; //不限制加入
|
||||||
|
optional int32 join_cond1 = 5; //加入条件1
|
||||||
|
optional int32 join_cond2 = 6; //加入条件2
|
||||||
|
}
|
||||||
|
//建公会返回
|
||||||
|
message SMGuildCreate
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //1:公会已存在 2: 你已经有公会
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
optional int64 guild_id = 3; //公会id
|
||||||
|
}
|
||||||
|
|
||||||
|
//加公会
|
||||||
|
message CMGuildJoin
|
||||||
|
{
|
||||||
|
optional int64 guild_id = 1; //公会id
|
||||||
|
}
|
||||||
|
//加群返回
|
||||||
|
message SMGuildJoin
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //1:公会id不存在 2:公会已满
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
}
|
||||||
|
|
||||||
|
//同意加公会
|
||||||
|
message CMGuildAgree
|
||||||
|
{
|
||||||
|
optional MFGuildApply apply = 1; //申请信息
|
||||||
|
optional int32 batchid = 2; //批次号(批量的时候id相同建议用时间戳)
|
||||||
|
}
|
||||||
|
message SMGuildAgree
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1;
|
||||||
|
optional string errmsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
//拒绝加公会申请
|
||||||
|
message CMGuildRefuse
|
||||||
|
{
|
||||||
|
optional MFGuildApply apply = 1; //申请信息
|
||||||
|
optional int32 batchid = 2; //批次号(批量的时候id相同建议用时间戳)
|
||||||
|
}
|
||||||
|
message SMGuildRefuse
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1;
|
||||||
|
optional string errmsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
//踢人
|
||||||
|
message CMGuildKick
|
||||||
|
{
|
||||||
|
optional string account_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//踢人回复
|
||||||
|
message SMGuildKick
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //1:群id错误
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
}
|
||||||
|
|
||||||
|
//退公会
|
||||||
|
message CMGuildQuit
|
||||||
|
{
|
||||||
|
}
|
||||||
|
message SMGuildQuit
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
}
|
||||||
|
|
||||||
|
//解散公会
|
||||||
|
message CMGuildDismiss
|
||||||
|
{
|
||||||
|
}
|
||||||
|
message SMGuildDismiss
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改公会信息(增量更新不需要修改的字段不传)
|
||||||
|
message CMGuildChange
|
||||||
|
{
|
||||||
|
optional string guild_name = 1; //公会名字
|
||||||
|
optional int32 guild_badge = 2; //公会徽标
|
||||||
|
optional string guild_declaration = 3; //公会徽标
|
||||||
|
optional int32 join_unlimited = 4; //不限制加入
|
||||||
|
optional int32 join_cond1 = 5; //加入条件1
|
||||||
|
optional int32 join_cond2 = 6; //加入条件2
|
||||||
|
}
|
||||||
|
message SMGuildChange
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
optional MFGuildBasic info = 3; //公会信息
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询公会
|
||||||
|
message CMGuildSearch
|
||||||
|
{
|
||||||
|
optional MFPaging paging = 1; //分页信息
|
||||||
|
optional string guild_name = 2; //公会名字
|
||||||
|
}
|
||||||
|
message SMGuildSearch
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
optional MFPaging paging = 3; //分页信息
|
||||||
|
repeated MFGuildBasic guild_list = 4; //公会列表
|
||||||
|
}
|
||||||
|
|
||||||
|
//公会排行榜
|
||||||
|
message CMGuildRank
|
||||||
|
{
|
||||||
|
optional MFPaging paging = 1; //分页信息
|
||||||
|
}
|
||||||
|
message SMGuildRank
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
optional MFPaging paging = 3; //分页信息
|
||||||
|
repeated MFGuildBasic guild_list = 4; //公会列表
|
||||||
|
}
|
||||||
|
|
||||||
|
//公会成员
|
||||||
|
message CMGuildMemberList
|
||||||
|
{
|
||||||
|
optional MFPaging paging = 1; //分页信息
|
||||||
|
optional string member_name = 2; //成员名字
|
||||||
|
}
|
||||||
|
message SMGuildMemberList
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
optional MFPaging paging = 3; //分页信息
|
||||||
|
repeated MFUserInfo member_list = 4; //公会成员列表
|
||||||
|
optional int32 guild_lv = 5; //公会等级
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取公会申请列表
|
||||||
|
message CMGuildApplyList
|
||||||
|
{
|
||||||
|
optional MFPaging paging = 1; //分页信息
|
||||||
|
}
|
||||||
|
//获取公会申请列表回复
|
||||||
|
message SMGuildApplyList
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
optional MFPaging paging = 3; //分页信息回传
|
||||||
|
repeated MFGuildApply apply_list = 4; //申请加公会友列表
|
||||||
|
optional int32 guild_lv = 5; //公会等级
|
||||||
|
}
|
||||||
|
|
||||||
|
//公会动态(日志)
|
||||||
|
message CMGuildLog
|
||||||
|
{
|
||||||
|
optional MFPaging paging = 1; //分页信息
|
||||||
|
}
|
||||||
|
message SMGuildLog
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
optional MFPaging paging = 3; //分页信息
|
||||||
|
/*
|
||||||
|
values[0]: account_id
|
||||||
|
values[1]: 角色名
|
||||||
|
values[2]: 职位 1:队长 2:副队长 3:精英会员 其他(0):普通会员
|
||||||
|
values[3]: 行为时间(unix时间戳)
|
||||||
|
values[4]: 行为
|
||||||
|
*/
|
||||||
|
repeated MFStringTuple logs = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置公会成员职位
|
||||||
|
message CMGuildMemberSetJob
|
||||||
|
{
|
||||||
|
optional string member_id = 1; //成员id
|
||||||
|
optional int32 job = 2; //职位
|
||||||
|
}
|
||||||
|
message SMGuildMemberSetJob
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
}
|
||||||
|
|
||||||
|
//同意邀请
|
||||||
|
message CMGuildAgreeInvite
|
||||||
|
{
|
||||||
|
optional int64 guild_id = 1; //公会id
|
||||||
|
optional string user_sign = 2; //邀请方签名
|
||||||
|
}
|
||||||
|
message SMGuildAgreeInvite
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
}
|
||||||
|
|
||||||
|
//新增公会经验
|
||||||
|
message CMGuildGainExp
|
||||||
|
{
|
||||||
|
optional int32 exp = 1; //检验值
|
||||||
|
}
|
||||||
|
message SMGuildGainExp
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询公会成员信息
|
||||||
|
message CMGuildSearchMember
|
||||||
|
{
|
||||||
|
optional string target_id = 1; //账号id
|
||||||
|
}
|
||||||
|
message SMGuildSearchMember
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
optional MFGuildBasic guild_basic = 3; //公会基本信息
|
||||||
|
optional MFUserInfo user_info = 4; //用户信息
|
||||||
|
}
|
||||||
|
|
||||||
|
//发送聊天消息
|
||||||
|
message CMSendChatMsg
|
||||||
|
{
|
||||||
|
optional int32 chat_channel = 1; //聊天频道 1: 世界 2:好友 3:战队 4:小队(这时target表示队伍Id) 5:大喇叭 6:跑马灯(只能收不能发)
|
||||||
|
optional string target = 2; //目标
|
||||||
|
optional int32 msg_type = 3; ////消息类型 0:文本消息(json) 1:自定义协议 (json) 2:纯文本(但是任会做屏蔽字替换)
|
||||||
|
optional string msg_body = 4; //消息内容
|
||||||
|
repeated string members = 5; //小队成员列表(包含自己)
|
||||||
|
}
|
||||||
|
|
||||||
|
//读取聊天消息列表并且开启聊天通知
|
||||||
|
message CMReadMsgAndOpenChatNotify
|
||||||
|
{
|
||||||
|
optional int32 curr_channel = 1; //当前频道
|
||||||
|
repeated MFPairInt64 last_ids = 2; //所有频道 key:聊天频道 val:该频道最后一次收到的消息id
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置当前私聊目标
|
||||||
|
message CMSetCurrPrivateChatTarget
|
||||||
|
{
|
||||||
|
optional string private_target = 1; //私聊对象id, 只有当前聊频道是私聊时字段才有意义
|
||||||
|
optional int64 last_id = 2; //最后收到想消息id
|
||||||
|
}
|
||||||
|
|
||||||
|
//关闭聊天通知
|
||||||
|
message CMCloseChatNotify
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//发送自定义消息
|
||||||
|
message CMSendCustomMsg
|
||||||
|
{
|
||||||
|
repeated string target_list = 1; //目标列表
|
||||||
|
optional string msg = 2; //消息内容
|
||||||
|
optional int64 param1 = 3; //透传参数1
|
||||||
|
optional int64 param2 = 4; //透传参数2
|
||||||
|
optional int64 param3 = 5; //透传参数3
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新临时自定义数据
|
||||||
|
message CMUpdateTempCustomData
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
更新方式
|
||||||
|
0: 覆盖
|
||||||
|
1: 用新数据和服务器数据做或运算
|
||||||
|
2: 用新数据和服务器数据做与运算
|
||||||
|
|
||||||
|
!!!注意
|
||||||
|
MFUserRaltimeData走的是增量更新如果不需要处理的字段不传就行
|
||||||
|
服务器对未传的自动不做任何处理
|
||||||
|
*/
|
||||||
|
optional int32 update_type = 1; //更新方式
|
||||||
|
optional MFUserTempCustomData temp_custom_data = 2; //临时自定义数据
|
||||||
|
|
||||||
|
optional int32 delay_time = 100; //延迟更新(单位毫秒)
|
||||||
|
optional int32 delay_flag = 101; //延迟更新标志(只能为1-16),相同的flag定时器覆盖
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询用户状态
|
||||||
|
message CMQueryUserStatus
|
||||||
|
{
|
||||||
|
repeated string user_list = 1; //用户列表
|
||||||
|
}
|
||||||
|
//查询用户状态返回
|
||||||
|
message SMQueryUserStatus
|
||||||
|
{
|
||||||
|
repeated MFUserStatus status_list = 1; //用户状态列表
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取推荐好友
|
||||||
|
message CMRecommandFriend
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//获取推荐好友返回
|
||||||
|
message SMRecommandFriend
|
||||||
|
{
|
||||||
|
repeated MFUserInfo friend_list = 1; //好友列表
|
||||||
|
}
|
||||||
|
|
||||||
|
//用户上/下线通知
|
||||||
|
message SMUserStatusNotify
|
||||||
|
{
|
||||||
|
repeated string online_users = 1; //上线用户
|
||||||
|
repeated string offline_users = 2; //下线用户
|
||||||
|
}
|
||||||
|
|
||||||
|
//聊天消息通知
|
||||||
|
message SMChatMsgNotify
|
||||||
|
{
|
||||||
|
repeated MFChatMsg msg_list = 1; //消息列表,客户端需要根据chat_channel和msg_uuid更新本地的last_ids
|
||||||
|
}
|
||||||
|
|
||||||
|
//发送自定义消息
|
||||||
|
message SMCustomMsgNotify
|
||||||
|
{
|
||||||
|
optional string sender = 1; //发送者
|
||||||
|
optional string msg = 2; //消息内容
|
||||||
|
optional int64 param1 = 3; //透传参数1
|
||||||
|
optional int64 param2 = 4; //透传参数2
|
||||||
|
optional int64 param3 = 5; //透传参数3
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新用户信息
|
||||||
|
message SMUserInfoUpdate
|
||||||
|
{
|
||||||
|
repeated MFUserInfo user_infos = 1; //用户信息列表
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除好友通知a
|
||||||
|
message SMDeleteFriendNotify
|
||||||
|
{
|
||||||
|
repeated string user_list = 1; //用户列表
|
||||||
|
}
|
||||||
|
|
||||||
|
//新增黑名单
|
||||||
|
message SMAddBlackListNotify
|
||||||
|
{
|
||||||
|
repeated MFUserInfo user_infos = 1; //用户信息列表
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除黑名单通知
|
||||||
|
message SMDeleteBlackListNotify
|
||||||
|
{
|
||||||
|
repeated string user_list = 1; //用户列表
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新用户临时自定义信息
|
||||||
|
message SMUserTempCustomDataUpdate
|
||||||
|
{
|
||||||
|
optional string account_id = 1; //账号id
|
||||||
|
optional MFUserTempCustomData temp_custom_data = 2; //用户临时自定义数据
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新账号信息通知
|
||||||
|
message SMUpdateAccountInfo
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新红点信息
|
||||||
|
message SMUpdateRedPointNotify
|
||||||
|
{
|
||||||
|
optional int32 red_point_flags = 1; //红点信息 1<<0:好友申请 1<<1:公会申请 1<<2:聊天红点
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新聊天红点信息
|
||||||
|
message SMUpdateChatRedPointNotify
|
||||||
|
{
|
||||||
|
repeated int32 has_unread_msg_channels = 1; //含有未读消息的渠道id列表,不在列表里的渠道默认不含有
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新私聊红点信息
|
||||||
|
message SMUpdatePrivateChatRedPointNotify
|
||||||
|
{
|
||||||
|
repeated string has_unread_msg_accounts = 1; //有未读消息的账号列表,不在列表里的好友more不含有
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新频道最后一次收到的消息id
|
||||||
|
message SMUpdateChatChannelLastId
|
||||||
|
{
|
||||||
|
repeated MFPairInt64 last_ids = 1; //所有频道 key:聊天频道 val:该频道最后一次收到的消息id
|
||||||
|
}
|
||||||
|
|
||||||
|
//显示飘字
|
||||||
|
message SMShowErrorMsg
|
||||||
|
{
|
||||||
|
optional string msg = 1; //飘字内容
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user