上传练功状态设置代码优化
This commit is contained in:
parent
58771acfec
commit
1391d464e6
@ -60,9 +60,7 @@ func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePractic
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
}
|
||||
if code = this.module.ModuleHero.KungFuHero(session, req.Hero, true, ""); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
|
||||
if req.Teacher != "" {
|
||||
if room.Knapsack[req.Teacher] == 1 { //已经被使用
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
@ -90,7 +88,9 @@ func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePractic
|
||||
pillar.Prop = req.Prop
|
||||
}
|
||||
pillar.Hero = req.Hero
|
||||
|
||||
if code = this.module.ModuleHero.KungFuHero(session, req.Hero, true, ""); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
pillar.Start = configure.Now().Unix()
|
||||
if extra >= 0 {
|
||||
pillar.End = configure.Now().Add(time.Minute * (time.Duration(pillarconfigure.PlacementDuration))).Unix()
|
||||
|
Loading…
Reference in New Issue
Block a user