You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.1 KiB
Protocol Buffer
74 lines
2.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package pb.common;
|
|
|
|
option go_package = "dcg/game/pb/common;pbCommon";
|
|
|
|
// PbUser 用户
|
|
message PbUser {
|
|
int64 uId = 1; // 用户id
|
|
string uname = 2; // 用户名
|
|
string avatar = 3; // 头像
|
|
int32 nobilityLevel = 4; // 贵族等级
|
|
int64 integral = 5; // 用户当前积分
|
|
}
|
|
|
|
// UserIntegralChanged 用户积分变更 push -> user.integral.change
|
|
message UserIntegralChanged {
|
|
pb.common.PbUser user = 1;
|
|
int64 change = 2; // 变更量
|
|
int64 integral = 3; // 现有量
|
|
}
|
|
|
|
// ChangeUserIntegral 更新用户积分 request -> user.integral.change
|
|
message ChangeUserIntegralReq {
|
|
int64 userId = 1; // 用户ID
|
|
int64 change = 2; // 更新积分量,负数为消耗,正数为增加
|
|
}
|
|
|
|
// ChangeUserIntegralResp 用户积分更新返回
|
|
message ChangeUserIntegralResp {
|
|
bool success = 1; // 是否更新成功
|
|
string msg = 2; // 消息
|
|
int64 userId = 3; // 用户ID
|
|
int64 change = 4; // 本次更新积分量
|
|
int64 integral = 5; // 当前剩余积分
|
|
}
|
|
|
|
// CheckInMsg 每日打卡 push -> user.checkIn
|
|
message CheckInMsg {
|
|
pb.common.PbUser user = 1; // 最新积分放置在user中
|
|
bool success = 2; // 打卡成功与否
|
|
string msg = 3; // 打卡消息: [打卡成功,快乐玩耍吧! | 今天已打过卡了!]
|
|
int64 integralChange = 4; // 积分变动
|
|
bool isCritical = 5; // 是否发生了打卡积分奖励暴击
|
|
}
|
|
|
|
// StarterPackMsg 新手礼包 push -> user.starterPack 命令(新手礼包)
|
|
message StarterPackMsg {
|
|
pb.common.PbUser user = 1;
|
|
bool success = 2; // 领取成功与否
|
|
string msg = 3; // 领取消息: [成功无msg | 已经领过礼包了]
|
|
int64 integralChange = 4; // 积分变动
|
|
}
|
|
|
|
// QueryIntegralMsg 用户查询信息通知 push -> user.query
|
|
message UserQueryMsg {
|
|
pb.common.PbUser user = 1;
|
|
}
|
|
|
|
// DanmakuMsg 普通弹幕消息 push -> live.danmaku
|
|
message DanmakuMsg {
|
|
pb.common.PbUser user = 1;
|
|
string content = 2;
|
|
}
|
|
|
|
// 赠送礼物 push -> live.gift
|
|
message GiftMsg{
|
|
pb.common.PbUser user = 1;
|
|
int64 giftId = 2;
|
|
int64 num = 3;
|
|
string giftName = 4;
|
|
int64 price = 5; // 单价
|
|
bool isPaid = 6; // 是否收费礼物
|
|
} |