上传水晶代码
This commit is contained in:
parent
f778c6829b
commit
1ee426fcbc
@ -113,6 +113,10 @@ func (this *apiComp) InRoom(session comm.IUserSession, req *pb.PassonInRoomReq)
|
||||
if errdata = this.module.ModuleHero.PassonHero(session, map[string]bool{hero.Id: true}); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
passon.Student[req.Index].State = 1
|
||||
passon.Student[req.Index].Heroid = hero.Id
|
||||
|
||||
if err = this.module.modelPasson.updateUserPasson(session.GetUserId(), passon); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
|
@ -36,12 +36,12 @@ func (this *apiComp) OutRoom(session comm.IUserSession, req *pb.PassonOutRoomReq
|
||||
}
|
||||
return
|
||||
}
|
||||
passon.Student[req.Index].State = 2
|
||||
passon.Student[req.Index].Cdtime = configure.Now().Unix()
|
||||
|
||||
if errdata = this.module.ModuleHero.PassonHero(session, map[string]bool{req.Heroid: false}); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
passon.Student[req.Index].State = 2
|
||||
passon.Student[req.Index].Cdtime = configure.Now().Unix()
|
||||
if err = this.module.modelPasson.updateUserPasson(session.GetUserId(), passon); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
|
Loading…
Reference in New Issue
Block a user