优化错误码

This commit is contained in:
liwei1dao 2022-11-10 16:38:24 +08:00
parent 044486720e
commit 73b935db20
4 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.AcademyChallen
}
if level, err = this.module.configure.getGameTeaching(req.Level); err != nil {
cd = pb.ErrorCode_DBError
cd = pb.ErrorCode_ConfigNoFound
return
}
cd, record = this.module.battle.CreateEveBattle(session, &pb.BattleEVEReq{

View File

@ -35,7 +35,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.AcademyReceiveRe
return
}
if level, err = this.module.configure.getGameTeaching(req.Level); err != nil {
code = pb.ErrorCode_DBError
code = pb.ErrorCode_ConfigNoFound
return
}
if req.Report.Completetask == nil || len(req.Report.Completetask) != len(level.Task) {

View File

@ -44,7 +44,7 @@ func (this *apiComp) Teaching(session comm.IUserSession, req *pb.AcademyTeaching
}
if level, err = this.module.configure.getGameHeroTeaching(req.HeroId); err != nil {
cd = pb.ErrorCode_DBError
cd = pb.ErrorCode_ConfigNoFound
return
}
cd, record = this.module.battle.CreateEveBattle(session, &pb.BattleEVEReq{

View File

@ -35,7 +35,7 @@ func (this *apiComp) TeachingReceive(session comm.IUserSession, req *pb.AcademyT
return
}
if level, err = this.module.configure.getGameHeroTeaching(req.HeroId); err != nil {
code = pb.ErrorCode_DBError
code = pb.ErrorCode_ConfigNoFound
return
}
if req.Report.Completetask == nil || len(req.Report.Completetask) != len(level.Task) {