Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev

This commit is contained in:
meixiongfeng 2022-07-22 22:14:46 +08:00
commit 82e8d0e608

View File

@ -3,6 +3,7 @@ package user
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"google.golang.org/protobuf/proto"
)
@ -66,16 +67,19 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (c
code = pb.ErrorCode_DBError
return
}
var (
res []*cfg.Game_atn
)
//初始化英雄卡
if val, err := this.module.configure.GetGlobalInitConf(); err == nil {
for _, v := range val.GetDataList() {
res = append(res, v.Var...)
code = this.module.DispenseRes(session, v.Var, true)
}
code = this.module.DispenseRes(session, res, true)
if code != pb.ErrorCode_Success {
this.module.Errorf("资源发放失败,%v", code)
}
}
//defaultHero := utils.TrInt32(val)
// err = this.hero.CreateHeroes(session.GetUserId(), defaultHero...)
// if err != nil {