协议更新

This commit is contained in:
ygy 2024-10-22 18:05:09 +08:00
parent b48dc4af18
commit bb0bd8449a
3 changed files with 74 additions and 2 deletions

View File

@ -1,5 +1,6 @@
cd $CCC_CLIENT_DIR/protocol/rank
cd $CCC_CLIENT_DIR/public/protocol/rank
npx pbjs --dependency protobufjs/minimal.js --target static-module --wrap commonjs --out rank.js ./*.proto --path $PUBLIC_DIR/
npx pbts --main --out ./rank.d.ts ./rank.js
cp ./rank.d.ts ./rank.js $CCC_CLIENT_DIR/vietnam/assets/ScriptCore/protocol
rm rank.d.ts rank.js

View File

@ -29,6 +29,10 @@ enum Rank{
PACKET_CSRoomAward = 10014;
PACKET_SCRoomAward = 10015;
PACKET_SCRoomAwardOne = 10016; // 竞技馆获奖记录通知
// 竞技馆抽奖历史
PACKET_CSLotteryHistory = 10017;
PACKET_SCLotteryHistory = 10018;
}
// 排位榜
@ -230,6 +234,8 @@ message UserAward{
string Name = 2; // 昵称
repeated Item Awards = 3; // 奖品
int64 Ts = 4; // 获得时间
int64 Price = 5; // 奖品价值
string ImageURL = 6; // 奖品图片
}
//PACKET_SCRoomAward
@ -239,3 +245,27 @@ message SCRoomAward{
int32 Limit = 3; // 每页数量
int32 Total = 4; // 总数量
}
// 竞技馆抽奖历史
// PACKET_CSLotteryHistory
message CSLotteryHistory{}
message LotteryShow {
int32 Tp = 1; // 资源类型
string Url = 2; // 资源地址
string ImgUrl = 3; // 缩略图地址
}
message LotteryHistory{
int64 Ts = 1; // 时间戳
int32 Index = 2; // 期数
int32 SnId = 3; // 玩家id
string Name = 4; // 玩家名字
repeated Item Award = 5; // 本期奖品
repeated LotteryShow Show = 6; // 展示列表
}
// PACKET_SCLotteryHistory
message SCLotteryHistory{
repeated LotteryHistory List = 1;
}

View File

@ -79,6 +79,10 @@ enum SPacketID {
PACKET_CSPermitShop = 2925; // 典藏通行证商品信息
PACKET_SCPermitShop = 2956; // 典藏通行证商品信息
PACKET_CSLotteryInfo = 2926; // 抽奖信息
PACKET_SCLotteryInfo = 2927; // 抽奖信息
PACKET_NotifyLotteryAward = 2928; // 通知抽奖中奖
}
//救济金领取
@ -499,3 +503,40 @@ message SCPermitShop{
int32 Consume = 3; // 购买消耗类型 1金币 2钻石
int64 price = 4; // 价格
}
// 抽奖信息
//PACKET_CSLotteryInfo
message CSLotteryInfo{
}
message LotteryInfo {
int64 Id = 1; // 抽奖id
int64 StartTs = 2; // 开始时间
int64 EndTs = 3; // 结束时间
int64 WinTs = 4; // 开奖时间
int64 RemainCode = 5; // 剩余号码
int64 TotalCode = 6; // 总号码
repeated PropInfo Award = 7; // 本期奖品
int32 State = 8; // 状态 1已结束 2进行中中 3未开始
string WinCode = 9; // 开奖号码
int32 SnId = 10; // 中奖玩家id
string Name = 11; // 中奖玩家名字
int32 Index = 12; // 期数
int64 Price = 13; // 奖品价值,美分
int32 NeedRoomCard = 14; // 消耗几张房卡获得一个开奖码
string ImageURL = 15; // 图片地址
// 玩家数据
int64 CostRoomCard = 16; // 消耗房卡
repeated string Codes = 17; // 本期获得号码
}
//PACKET_SCLotteryInfo
message SCLotteryInfo{
repeated LotteryInfo Info = 1; // 抽奖活动信息
}
// 通知抽奖中奖
//PACKET_NotifyLotteryAward
message NotifyLotteryAward{
LotteryInfo Info = 1; // 抽奖活动信息
}