上传创号修改
This commit is contained in:
parent
30d611525f
commit
7d95d4523d
@ -62,19 +62,19 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (e
|
||||
}
|
||||
|
||||
//查询昵称是否重复
|
||||
if ok := this.module.modelUser.NickNameIsExist(req.NickName); !ok {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_UserNickNameExist,
|
||||
Title: pb.ErrorCode_UserNickNameExist.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
// if ok := this.module.modelUser.NickNameIsExist(req.NickName); !ok {
|
||||
// errdata = &pb.ErrorData{
|
||||
// Code: pb.ErrorCode_UserNickNameExist,
|
||||
// Title: pb.ErrorCode_UserNickNameExist.ToString(),
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
update := map[string]interface{}{
|
||||
"name": req.NickName, //设置昵称
|
||||
"created": true, //创角标识
|
||||
"figure": req.Figure, //设置形象
|
||||
"gender": req.Gender, //设置性别
|
||||
"ps": 0, //设置初始体力 调整未0 由策划初始表发放
|
||||
// "name": req.NickName, //设置昵称
|
||||
"created": true, //创角标识
|
||||
"figure": req.Figure, //设置形象
|
||||
"gender": req.Gender, //设置性别
|
||||
"ps": 0, //设置初始体力 调整未0 由策划初始表发放
|
||||
}
|
||||
globalConf := this.module.globalConf
|
||||
if req.Gender == 0 {
|
||||
@ -95,9 +95,8 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (e
|
||||
)
|
||||
return
|
||||
}
|
||||
if req.Figure != 0 {
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype72, 1))
|
||||
}
|
||||
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype72, 1))
|
||||
session.SendMsg(string(this.module.GetType()), UserSubTypeCreate, &pb.UserCreateResp{
|
||||
NickName: req.NickName,
|
||||
Figure: req.Figure,
|
||||
|
@ -72,8 +72,8 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
|
||||
firstLogin = true
|
||||
expand = &pb.DBUserExpand{}
|
||||
|
||||
user.CurSkin = this.module.ModuleTools.GetGlobalConf().Initper.T
|
||||
user.Skins = []string{user.CurSkin}
|
||||
// user.CurSkin = this.module.ModuleTools.GetGlobalConf().Initper.T
|
||||
// user.Skins = []string{user.CurSkin}
|
||||
}
|
||||
// 玩家是否封号
|
||||
if user.Ban {
|
||||
@ -146,6 +146,10 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
|
||||
return
|
||||
}
|
||||
session.SetSession(session.GetIP(), session.GetSessionId(), session.GetServiecTag(), session.GetGatewayServiceId(), user.Uid)
|
||||
if user.CurSkin == "" {
|
||||
user.CurSkin = this.module.ModuleTools.GetGlobalConf().Initper.T
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), UserSubTypeLogin, &pb.UserLoginResp{
|
||||
Data: user,
|
||||
Ex: expand,
|
||||
|
Loading…
Reference in New Issue
Block a user