上传代码
This commit is contained in:
parent
ef7eaf70a1
commit
1063650e63
@ -18,17 +18,31 @@ func (this *apiComp) Enrolled(session comm.IUserSession, req *pb.PracticeEnrolle
|
||||
|
||||
var (
|
||||
err error
|
||||
hero *pb.DBHero
|
||||
room *pb.DBPracticeRoom
|
||||
)
|
||||
if code = this.module.ModuleHero.RegisterInstructor(session, req.Hero, req.Group); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
|
||||
if room, err = this.module.modelPandata.queryUserMartialhall(session.GetUserId()); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
if req.Group != 0 {
|
||||
if code = this.module.ModuleHero.RegisterInstructor(session, req.Hero, req.Group); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
room.Full[req.Group]++
|
||||
} else {
|
||||
if hero, err = this.module.ModuleHero.QueryCrossHeroinfo(req.Hero); err != nil {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
|
||||
if code = this.module.ModuleHero.RegisterInstructor(session, req.Hero, req.Group); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
room.Full[hero.Fulllvenr]--
|
||||
}
|
||||
|
||||
this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{
|
||||
"full": room.Full,
|
||||
})
|
||||
|
@ -112,7 +112,7 @@ func (this *configureComp) getGamePandamasYxjx(id int32) (configure *cfg.GamePan
|
||||
v interface{}
|
||||
ok bool
|
||||
)
|
||||
if v, err = this.GetConfigure(game_pandamasjx); err != nil {
|
||||
if v, err = this.GetConfigure(game_pandamasyxjx); err != nil {
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user