This commit is contained in:
meixiongfeng 2023-09-13 11:39:44 +08:00
commit 4d1ab8302a

View File

@ -100,6 +100,12 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (e
if req.Figure != 0 {
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype72, 1))
}
session.SendMsg(string(this.module.GetType()), UserSubTypeCreate, &pb.UserCreateResp{
NickName: req.NickName,
Figure: req.Figure,
Gender: req.Gender,
Award: award,
})
//初始化创角资源
if val, err := this.module.configure.GetGlobalInitConf(); err == nil {
for _, v := range val.GetDataList() {
@ -109,13 +115,6 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (e
this.module.Error("发放资源失败!", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "err", Value: errdata.String()})
}
}
session.SendMsg(string(this.module.GetType()), UserSubTypeCreate, &pb.UserCreateResp{
NickName: req.NickName,
Figure: req.Figure,
Gender: req.Gender,
Award: award,
})
//异步逻辑
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {