125 lines
2.6 KiB
Protocol Buffer
125 lines
2.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
option go_package = ".;pb";
|
|
import "errorcode.proto";
|
|
import "user_db.proto";
|
|
import "comm.proto";
|
|
import "userexpand.proto";
|
|
|
|
//用户登录
|
|
message UserLoginReq {
|
|
string account = 1; //账号
|
|
int32 sid = 2; //区服编号
|
|
}
|
|
|
|
message UserLoginResp {
|
|
DBUser data = 1;
|
|
DBUserExpand ex = 2; //用户扩展
|
|
}
|
|
|
|
//登出
|
|
message UserLogoutReq {}
|
|
|
|
message UserLogoutResp {}
|
|
|
|
//注册
|
|
message UserRegisterReq {
|
|
string account = 1;
|
|
int32 sid = 2;
|
|
}
|
|
|
|
message UserRegisterResp {
|
|
ErrorCode Code = 1;
|
|
string account = 2;
|
|
}
|
|
|
|
message UserLoadResp { CacheUser data = 1; }
|
|
|
|
//创角
|
|
message UserCreateReq {
|
|
string NickName = 1; //昵称
|
|
}
|
|
|
|
message UserCreateResp { bool IsSucc = 1; }
|
|
|
|
//添加用户资源
|
|
message UserAddResReq {
|
|
UserAssets res = 1; //资源类型
|
|
}
|
|
|
|
message UserAddResResp {
|
|
UserAssets res = 1; //资源类型
|
|
}
|
|
|
|
// 玩家资源变更推送
|
|
message UserResChangePush {
|
|
int32 gold = 1; //@go_tags(`bson:"gold"`) 金币
|
|
int32 exp = 2; //@go_tags(`bson:"exp"`) 经验
|
|
int32 lv = 3; //@go_tags(`bson:"lv"`) 等级
|
|
int32 vip = 4; //@go_tags(`bson:"vip"`) vip
|
|
int32 diamond = 5; //@go_tags(`bson:"diamond"`) 钻石
|
|
}
|
|
|
|
//用户设置获取
|
|
message UserGetSettingReq {}
|
|
|
|
message UserGetSettingResp {
|
|
DBUserSetting setting = 1; //用户设置
|
|
}
|
|
|
|
// 更新用户设置
|
|
message UserUpdateSettingReq { DBUserSetting setting = 1; }
|
|
message UserUpdateSettingResp { string uid = 1; }
|
|
|
|
// 初始化验证码
|
|
message UserVeriCodeReq {}
|
|
message UserVeriCodeResp {
|
|
int32 code = 1; //验证码
|
|
}
|
|
|
|
//初始化用户数据
|
|
message UserInitdataReq {
|
|
int32 code = 1; //验证码
|
|
}
|
|
message UserInitdataResp { string uid = 1; }
|
|
|
|
//修改玩家名字
|
|
message UserModifynameReq {
|
|
string name = 1; //玩家名称
|
|
}
|
|
message UserModifynameResp {
|
|
string uid = 1;
|
|
uint32 count = 2; //剩余修改次数
|
|
}
|
|
|
|
// 图鉴
|
|
message UserGetTujianReq {}
|
|
message UserGetTujianResp { repeated string heroids = 1; }
|
|
|
|
//玩家等级经验变化推送
|
|
message UserChangedPush {
|
|
string uid = 1;
|
|
int32 exp = 2;
|
|
int32 lv = 3;
|
|
}
|
|
|
|
//主角形象
|
|
message UserFigureReq {
|
|
int32 preinstall = 1; //预设编号 1-5
|
|
int32 action = 2; //部位 1-5 0不修改任何数据
|
|
Hair hair = 3; //部位 1
|
|
Eyes eyes = 4; //部位 2
|
|
Mouth mouth = 5; //部位 3
|
|
Body body = 6; //部位 4
|
|
Complexion complexion = 7; //部位 5
|
|
}
|
|
|
|
message UserFigureResp {
|
|
string uid = 1;
|
|
int32 action = 2; //部位
|
|
Figure figure = 3;
|
|
}
|
|
|
|
// 用户签名
|
|
message UserModifysignReq { string sign = 1; }
|
|
|
|
message UserModifysignResp { string uid = 1; } |