Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
ebff117d3f
@ -18,7 +18,7 @@ func (this *apiComp) Enrolled(session comm.IUserSession, req *pb.PracticeEnrolle
|
||||
|
||||
var (
|
||||
err error
|
||||
hero *pb.DBHero
|
||||
hero []*pb.DBHero
|
||||
room *pb.DBPracticeRoom
|
||||
)
|
||||
|
||||
@ -32,7 +32,7 @@ func (this *apiComp) Enrolled(session comm.IUserSession, req *pb.PracticeEnrolle
|
||||
}
|
||||
room.Full[req.Group]++
|
||||
} else {
|
||||
if hero, err = this.module.ModuleHero.QueryCrossHeroinfo(req.Hero); err != nil {
|
||||
if hero, err = this.module.ModuleHero.QueryCrossMultipleHeroinfo(req.Hero); err != nil {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
@ -40,7 +40,10 @@ func (this *apiComp) Enrolled(session comm.IUserSession, req *pb.PracticeEnrolle
|
||||
if code = this.module.ModuleHero.RegisterInstructor(session, req.Hero, req.Group); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
room.Full[hero.Fulllvenr]--
|
||||
for _, v := range hero {
|
||||
room.Full[v.Fulllvenr]--
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{
|
||||
|
Loading…
Reference in New Issue
Block a user