This commit is contained in:
meixiongfeng 2023-11-14 20:47:15 +08:00
commit ed0dafe1d2
2 changed files with 9 additions and 6 deletions

View File

@ -70,7 +70,7 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (e
// return // return
// } // }
update := map[string]interface{}{ update := map[string]interface{}{
//"name": req.NickName, //设置昵称 // "name": req.NickName, //设置昵称
"created": true, //创角标识 "created": true, //创角标识
"figure": req.Figure, //设置形象 "figure": req.Figure, //设置形象
"gender": req.Gender, //设置性别 "gender": req.Gender, //设置性别
@ -95,9 +95,8 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (e
) )
return 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{ session.SendMsg(string(this.module.GetType()), UserSubTypeCreate, &pb.UserCreateResp{
NickName: req.NickName, NickName: req.NickName,
Figure: req.Figure, Figure: req.Figure,

View File

@ -72,8 +72,8 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
firstLogin = true firstLogin = true
expand = &pb.DBUserExpand{} expand = &pb.DBUserExpand{}
user.CurSkin = this.module.ModuleTools.GetGlobalConf().Initper.T // user.CurSkin = this.module.ModuleTools.GetGlobalConf().Initper.T
user.Skins = []string{user.CurSkin} // user.Skins = []string{user.CurSkin}
} }
// 玩家是否封号 // 玩家是否封号
if user.Ban { if user.Ban {
@ -146,6 +146,10 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
return return
} }
session.SetSession(session.GetIP(), session.GetSessionId(), session.GetServiecTag(), session.GetGatewayServiceId(), user.Uid) 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{ session.SendMsg(string(this.module.GetType()), UserSubTypeLogin, &pb.UserLoginResp{
Data: user, Data: user,
Ex: expand, Ex: expand,