上传补杨大赛代码优化

This commit is contained in:
liwei 2023-07-07 14:39:02 +08:00
parent 1bdaa38367
commit 38a0f0249f
3 changed files with 27 additions and 23 deletions

View File

@ -2,6 +2,7 @@ package parkour
import ( import (
"fmt" "fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/sys/configure" "go_dreamfactory/sys/configure"
@ -73,7 +74,7 @@ func (this *configureComp) getGameBuzkashiMount(id string) (configure *cfg.GameB
return return
} else { } else {
if configure, ok = v.(*cfg.GameBuzkashiMount).GetDataMap()[id]; !ok { if configure, ok = v.(*cfg.GameBuzkashiMount).GetDataMap()[id]; !ok {
err = fmt.Errorf("not found:%s ", id) err = comm.NewNotFoundConfErr(moduleName, game_buzkashimount, id)
this.module.Errorln(err) this.module.Errorln(err)
return return
} }

View File

@ -85,6 +85,7 @@ func (this *ModelParkourComp) getrusers(uid string) (recommend []*pb.DBRaceMembe
continue continue
} }
if mount, err = this.module.configure.getGameBuzkashiMount(users[v].parkour.Dfmount); err != nil { if mount, err = this.module.configure.getGameBuzkashiMount(users[v].parkour.Dfmount); err != nil {
err = nil
continue continue
} }
users[v].member = &pb.DBRaceMember{ users[v].member = &pb.DBRaceMember{

View File

@ -23,6 +23,8 @@ import (
开发:李伟 开发:李伟
*/ */
const moduleName = "补羊大赛"
var _ comm.IParkour = (*Parkour)(nil) var _ comm.IParkour = (*Parkour)(nil)
func NewModule() core.IModule { func NewModule() core.IModule {