英雄变更推送打包
This commit is contained in:
parent
1f6222e2bd
commit
45c304c3d6
@ -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,15 +67,18 @@ 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)
|
||||
if code != pb.ErrorCode_Success {
|
||||
this.module.Errorf("资源发放失败,%v", code)
|
||||
}
|
||||
}
|
||||
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...)
|
||||
|
Loading…
Reference in New Issue
Block a user