数据校验
This commit is contained in:
parent
bf2b99fedf
commit
a4143f24e3
@ -61,6 +61,9 @@ func (this *apiComp) Train(session comm.IUserSession, req *pb.DragonTrainReq) (e
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if conf, err := this.module.configure.GetDragonConfById(dragon.Dragonid, dragon.Lv); err == nil {
|
||||||
|
if playConf, err = this.module.configure.GetDragonPlayConfById(dragon.Dragonid, conf.Type, req.Ttype); err == nil {
|
||||||
if playConf.Cd > 0 {
|
if playConf.Cd > 0 {
|
||||||
dragon.Play[req.Ttype].Cdendtime = configure.Now().Unix() + int64(playConf.Cd)
|
dragon.Play[req.Ttype].Cdendtime = configure.Now().Unix() + int64(playConf.Cd)
|
||||||
}
|
}
|
||||||
@ -72,8 +75,6 @@ func (this *apiComp) Train(session comm.IUserSession, req *pb.DragonTrainReq) (e
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if conf, err := this.module.configure.GetDragonConfById(dragon.Dragonid, dragon.Lv); err == nil {
|
|
||||||
if playConf, err = this.module.configure.GetDragonPlayConfById(dragon.Dragonid, conf.Type, req.Ttype); err == nil {
|
|
||||||
// 校验消耗
|
// 校验消耗
|
||||||
if errdata = this.module.CheckRes(session, playConf.Deplete); errdata != nil {
|
if errdata = this.module.CheckRes(session, playConf.Deplete); errdata != nil {
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user