syntax = "proto3";
option go_package = ".;pb";
import "errorcode.proto";
import "user_db.proto";
import "userexpand.proto";
import "pagoda_db.proto";
import "viking_db.proto";
import "hunting_db.proto";
import "serverdata.proto";
import "comm.proto";
//用户登录
message UserLoginReq {
  string account = 1; //账号
  string sid = 2;     //区服编号
}

message UserLoginResp {
  DBUser data = 1;
  DBUserExpand ex = 2; //用户扩展
  int64 timeNow = 3;   // 服务器时间
}

// 获取用户信息
message UserInfoReq {}

message UserInfoResp {
  DBUser data = 1;
  DBUserExpand ex = 2; //用户扩展
}

//登出
message UserLogoutReq {}

message UserLogoutResp {}

//注册
message UserRegisterReq {
  string account = 1;
  string sid = 2;
}

message UserRegisterResp {
  ErrorCode Code = 1;
  string account = 2;
}

message UserLoadResp { CacheUser data = 1; }

//创角
message UserCreateReq {
  string NickName = 1; //昵称
  int32 figure = 2;    // 模型 做展示用
  int32 gender = 3;    //性别 0男1女
}

message UserCreateResp { bool IsSucc = 1; }

// 玩家资源变更推送
message UserResChangedPush {
  int64 gold = 1;      //@go_tags(`bson:"gold"`) 金币
  int64 exp = 2;       //@go_tags(`bson:"exp"`) 经验
  int64 vipexp = 3;    //@go_tags(`bson:"vipexp"`) 经验
  int64 diamond = 4;   //@go_tags(`bson:"diamond"`)  钻石
  int32 friend = 5;    //@go_tags(`bson:"frined`) 友情点
  int64 starcoin = 6;  //@go_tags(`bson:"starcoin`) 星座币
  int32 guildcoin = 7; //@go_tags(`bson:"guildcoin`) 公会币
  int32 arenacoin = 8; //@go_tags(`bson:"arenacoin`) 竞技场币
  int32 ps = 9;        //@go_tags(`bson:"ps"`) 体力
  int32 moongold = 10; //@go_tags(`bson:"moongold"`) 纯净月髓
  int32 talent1 = 11; //@go_tags(`bson:"talent1"`) 阵营1天赋点
  int32 talent2 = 12; //@go_tags(`bson:"talent2"`) 阵营2天赋点
  int32 talent3 = 13; //@go_tags(`bson:"talent3"`) 阵营3天赋点
  int32 talent4 = 14; //@go_tags(`bson:"talent4"`) 阵营4天赋点
  int32 merchantmoney = 15;//@go_tags(`bson:"merchantmoney"`) 商队虚拟币
  repeated string perlist = 16;//@go_tags(`bson:"perlist"`) 皮肤资源
}
// 玩家在其它终端登录的通知
message UserOtherTermLoginPush { string uid = 1; }

message UserPsChangedPush {
  int32 ps = 1; //@go_tags(`bson:"ps"`) 体力
}

//用户设置获取
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; //剩余修改次数
  string name = 3;
}

// 修改头像
message UserModifyavatarReq {
  string avatarId = 1; //头像ID
}

message UserModifyavatarResp {
  string uid = 1;
  string avatarId = 2;
}

// 修改背景图片
message UserModifybgpReq {
  string bgpId = 1; //背景图片ID
}

message UserModifybgpResp {
  string uid = 1;
  string bgpId = 2; //背景图片ID
}

// 修改形象
message UserModifyfigureReq { int32 figureId = 1; }

message UserModifyfigureResp {
  string uid = 1;
  int32 figureId = 2;
}

// 图鉴
message UserGetTujianReq {}
message UserGetTujianResp { repeated string heroids = 1; }

//玩家等级经验变化推送
message UserLvChangedPush {
  string uid = 1;
  int64 exp = 2;
  int32 lv = 3;
}

// vip 等级变化
message UserVipChangedPush {
  string uid = 1;
  int64 vipExp = 2;
  int32 vipLv = 3;
}
// 用户签名
message UserModifysignReq { string sign = 1; }

message UserModifysignResp { string uid = 1; }

// 玩家战斗记录
message UserBattlerecordReq { string uid = 1; }

message UserBattlerecordResp {
  DBUser data = 1;
  DBUserExpand ex = 2;                      //用户扩展
  DBPagodaRecord pagodaRecord = 3;          //爬塔战斗记录
  repeated DBHuntingRank huntingRecord = 4; //狩猎战斗记录
  repeated DBVikingRank vikingRecord = 5;   //维京远征战斗记录
}

// 玩家阵容展示设置
message UserSettingteamReq {
  repeated string heroObjIds = 2; //英雄ID
}
message UserSettingteamResp { string uid = 1; }

//玩家阵容展示
message UserShowteamReq {}

message UserShowteamResp {
  repeated string heroObjIds = 1; //英雄ID
}

// 全服在线用用户session
message UserOnlineResp { repeated CacheUser users = 1; }

// 用户数据列表
message UserDataListResp { repeated DBUser users = 1; }

message UserGetServerDataReq {}

message UserGetServerDataResp { DBServerData data = 1; }

message UserSignReq {
}
// 推送签到信息
message UserSignResp {
  DBSign data = 1;
}

//拼图领奖
message UserPuzzleAwardReq {
  int32 index = 1;
}
//拼图领奖 回应
message UserPuzzleAwardResp {
  int32 index = 2;
}

// 修改提示次数
message UserChangeTipsReq {
  int32 tips = 1;
}

message UserChangeTipsResp {
  DBSign data = 1;
}


//出售资源
message UserSellResReq { repeated UserAtno atno = 1; }

//出售资源 回应
message UserSellResResp { 
  repeated UserAssets atn = 1;
  bool IsSucc = 2; 
}

//请求设置默认皮肤
message UserSwitchDefPerReq{
  string defper1 = 1;
  string defper2 = 2;
  string defper3 = 3;
}

//请求设置默认皮肤
message UserSwitchDefPerResp{
  bool issucc = 1;
  string defper1 =2;
  string defper2 = 3;
  string defper3 = 4;
}