210 lines
4.8 KiB
Protocol Buffer
210 lines
4.8 KiB
Protocol Buffer
syntax = "proto3";
|
|
package rank;
|
|
option go_package = "mongo.games.com/game/protocol/rank";
|
|
|
|
enum Rank{
|
|
PACKET_RANK_ZERO = 0;//弃用消息号
|
|
// 排位榜
|
|
PACKET_RANK_CSRankMatch = 10000;
|
|
PACKET_RANK_SCRankMatch = 10001;
|
|
// 财富榜(金币榜)
|
|
PACKET_RANK_CSCoin = 10002;
|
|
PACKET_RANK_SCCoin = 10003;
|
|
// 邀请积分排行榜
|
|
PACKET_RANK_CSInvite = 10004;
|
|
PACKET_RANK_SCInvite = 10005;
|
|
// 邀请记录
|
|
PACKET_CSInviteLog = 10006;
|
|
PACKET_SCInviteLog = 10007;
|
|
// 收入榜
|
|
PACKET_RANK_CSWinCoin = 10008;
|
|
PACKET_RANK_SCWinCoin = 10009;
|
|
//等级榜
|
|
PACKET_RANK_CSLevel = 10010;
|
|
PACKET_RANK_SCLevel = 10011;
|
|
//赛季通行证排行榜
|
|
PACKET_RANK_CSPermit = 10012;
|
|
PACKET_RANK_SCPermit = 10013;
|
|
}
|
|
|
|
// 排位榜
|
|
// PACKET_RANK_CSRankMatch
|
|
message CSRankMatch{
|
|
int32 Id = 1; // 排位类型
|
|
int32 Page = 2; // 页数
|
|
int32 PageSize = 3; // 每页数量
|
|
}
|
|
|
|
message SeasonRank {
|
|
int32 Snid = 1; // 玩家id
|
|
string Name = 2; // 昵称
|
|
int32 Lv = 3;//段位
|
|
int32 Rank = 4;//段位排名
|
|
int32 Sex = 5; // 性别
|
|
string HeadUrl = 6; // 头像
|
|
int64 Coin = 7; // 金币余额
|
|
int64 Score = 8; // 积分
|
|
int32 ModId = 9; // 角色id
|
|
}
|
|
|
|
// PACKET_RANK_SCRankMatch
|
|
message SCRankMatch{
|
|
repeated SeasonRank Ranks = 1; // 排行榜
|
|
SeasonRank Me = 2; // 玩家自己的排行信息
|
|
int32 Page = 3; // 页数
|
|
int32 PageSize = 4; // 每页数量
|
|
int32 Total = 5; // 总数量
|
|
}
|
|
|
|
// 财富榜(金币榜)
|
|
// PACKET_RANK_CSCoin
|
|
message CSCoin{
|
|
int32 Page = 1; // 页数
|
|
int32 PageSize = 2; // 每页数量
|
|
}
|
|
|
|
message PlayerCoin {
|
|
int32 Snid = 1; // 玩家id
|
|
string Name = 2; // 昵称
|
|
int32 Sex = 3; // 性别
|
|
string HeadUrl = 4; // 头像
|
|
int64 Coin = 5; // 金币余额
|
|
int32 Rank = 6; // 排名
|
|
int32 ModId = 7; // 角色id
|
|
}
|
|
|
|
// PACKET_RANK_SCCoin
|
|
message SCCoin{
|
|
repeated PlayerCoin Ranks = 1; // 排行榜
|
|
PlayerCoin Me = 2; // 玩家自己的排行信息
|
|
int32 Page = 3; // 页数
|
|
int32 PageSize = 4; // 每页数量
|
|
int32 Total = 5; // 总数量
|
|
}
|
|
|
|
// PACKET_RANK_CSInvite
|
|
message CSInvite{
|
|
int32 Id = 1; // 排位类型 1:总榜 2:周榜 3:月榜
|
|
int32 Skip = 2; // 偏移量
|
|
int32 Limit = 3; // 请求数量
|
|
}
|
|
|
|
message InviteRank {
|
|
int32 Snid = 1; // 玩家id
|
|
string Name = 2; // 昵称
|
|
int32 Rank = 3;//段位排名
|
|
int64 Score = 4; // 积分
|
|
int32 InviteNum = 5; // 邀请人数
|
|
int32 ModId = 6; // 头像模型
|
|
}
|
|
|
|
// PACKET_RANK_SCInvite
|
|
message SCInvite{
|
|
int32 Id = 1; // 排位类型 1:总榜 2:周榜 3:月榜
|
|
repeated InviteRank Ranks = 2; // 排行榜
|
|
InviteRank Me = 3; // 玩家自己的排行信息
|
|
int32 Skip = 4; // 偏移量
|
|
bool IsEndNum = 5;
|
|
int32 RankMaxNum = 6; // 排行榜最大上限
|
|
}
|
|
|
|
enum RankInvite{
|
|
InviteType_None = 0;
|
|
InviteType_Total = 1;//总榜
|
|
InviteType_Week = 2; //周榜
|
|
InviteType_Month = 3;//月榜
|
|
InviteType_UpWeek = 4;//上周榜
|
|
InviteType_Max = 5;
|
|
}
|
|
|
|
message GateTransmit {
|
|
string Platform = 1;
|
|
int32 Snid = 2;
|
|
bytes PacketData = 3;
|
|
}
|
|
|
|
message InviteInfo{
|
|
string Name = 1;
|
|
int32 SnId = 2;
|
|
int64 CreateTs = 3;
|
|
int64 Score = 4;
|
|
int32 ModId = 5;
|
|
}
|
|
|
|
// PACKET_CSInviteLog
|
|
message CSInviteLog{
|
|
int32 Skip = 1;
|
|
int32 Limit = 2;
|
|
}
|
|
// PACKET_SCInviteLog
|
|
message SCInviteLog{
|
|
int32 Skip = 1;
|
|
int32 Limit = 2;
|
|
repeated InviteInfo List = 3;
|
|
}
|
|
|
|
// PACKET_RANK_CSWinCoin
|
|
message CSWinCoin{
|
|
int32 Skip = 1;
|
|
int32 Limit = 2;
|
|
}
|
|
|
|
message WinCoinInfo {
|
|
int32 SnId = 1; // 玩家id
|
|
string Name = 2; // 昵称
|
|
int32 Rank = 3;//段位排名
|
|
int64 Coin = 4; // 赢分
|
|
int32 ModId = 6; // 头像模型
|
|
}
|
|
|
|
// PACKET_RANK_SCWinCoin
|
|
message SCWinCoin{
|
|
repeated WinCoinInfo Ranks = 1; // 排行榜
|
|
WinCoinInfo Me = 2; // 玩家自己的排行信息
|
|
int32 Skip = 3; // 页数
|
|
int32 Limit = 4; // 每页数量
|
|
}
|
|
|
|
//等级排行榜
|
|
//RACKET_CSLevelRank
|
|
message CSPlayerLevelRank{
|
|
int32 Skip = 1;
|
|
int32 Limit = 2;
|
|
}
|
|
message PlayerLevelRankInfo{
|
|
int32 SnId = 1; // 玩家id
|
|
string Name = 2; // 昵称
|
|
int64 Level = 3; // 等级
|
|
int32 Rank = 4; //排名
|
|
int32 ModId = 6; // 头像模型
|
|
}
|
|
//RACKET_SCLevelRank
|
|
message SCPlayerLevelRank{
|
|
repeated PlayerLevelRankInfo Ranks = 1; // 排行榜
|
|
PlayerLevelRankInfo Me = 2; // 玩家自己的排行信息
|
|
int32 Skip = 3; // 页数
|
|
int32 Limit = 4; // 每页数量
|
|
}
|
|
|
|
//PACKET_RANK_CSPermit
|
|
message CSPermit{
|
|
int32 Skip = 1; // 偏移量
|
|
int32 Limit = 2; // 请求数量
|
|
}
|
|
|
|
message PermitRank {
|
|
int32 Snid = 1; // 玩家id
|
|
string Name = 2; // 昵称
|
|
int32 Rank = 3;//段位排名
|
|
int64 Score = 4; // 积分
|
|
int32 ModId = 5; // 头像模型
|
|
}
|
|
|
|
// PACKET_RANK_SCPermit
|
|
message SCPermit{
|
|
repeated PermitRank Ranks = 1; // 排行榜
|
|
PermitRank Me = 2; // 玩家自己的排行信息
|
|
int32 Skip = 3; // 偏移量
|
|
bool IsEndNum = 4;
|
|
int32 RankMaxNum = 5; // 排行榜最大上限
|
|
} |