上传创角
This commit is contained in:
parent
09140da77a
commit
88711edbd3
@ -86,15 +86,6 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (e
|
|||||||
update["avatar"] = globalConf.GirlHeadPortrait
|
update["avatar"] = globalConf.GirlHeadPortrait
|
||||||
}
|
}
|
||||||
|
|
||||||
//初始化创角资源
|
|
||||||
if val, err := this.module.configure.GetGlobalInitConf(); err == nil {
|
|
||||||
for _, v := range val.GetDataList() {
|
|
||||||
res = append(res, v.Var...)
|
|
||||||
}
|
|
||||||
if errdata, award = this.module.DispenseAtno(session, res, true); errdata != nil {
|
|
||||||
this.module.Error("发放资源失败!", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "err", Value: errdata.String()})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if err := this.module.modelUser.Change(session.GetUserId(), update); err != nil {
|
if err := this.module.modelUser.Change(session.GetUserId(), update); err != nil {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_DBError,
|
Code: pb.ErrorCode_DBError,
|
||||||
@ -107,6 +98,16 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (e
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
//初始化创角资源
|
||||||
|
if val, err := this.module.configure.GetGlobalInitConf(); err == nil {
|
||||||
|
for _, v := range val.GetDataList() {
|
||||||
|
res = append(res, v.Var...)
|
||||||
|
}
|
||||||
|
if errdata, award = this.module.DispenseAtno(session, res, true); errdata != nil {
|
||||||
|
this.module.Error("发放资源失败!", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "err", Value: errdata.String()})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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,
|
||||||
|
Loading…
Reference in New Issue
Block a user