diff --git a/modules/battle/configure.go b/modules/battle/configure.go index 5f859f9d8..73ec401fe 100644 --- a/modules/battle/configure.go +++ b/modules/battle/configure.go @@ -2,6 +2,7 @@ package battle import ( "fmt" + "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/modules" "go_dreamfactory/sys/configure" @@ -74,7 +75,8 @@ func (this *configureComp) GetBattleReady(id int32) (conf *cfg.GameBattleReadyDa return } else { if conf, ok = v.(*cfg.GameBattleReady).GetDataMap()[id]; !ok { - err = fmt.Errorf("not found:%d ", id) + // err = fmt.Errorf("not found:%d ", id) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_battleready, id) this.module.Errorln(err) return } @@ -125,7 +127,8 @@ func (this *configureComp) getPandamasBuff(id int32) (configure *cfg.GamePandama return } else { if configure, ok = v.(*cfg.GamePandamasBuff).GetDataMap()[id]; !ok { - err = fmt.Errorf("not found:%d ", id) + // err = fmt.Errorf("not found:%d ", id) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_pandamasbuff, id) this.module.Errorln(err) return } diff --git a/modules/equipment/configure.go b/modules/equipment/configure.go index 0c3f07ccc..13df77dbd 100644 --- a/modules/equipment/configure.go +++ b/modules/equipment/configure.go @@ -114,7 +114,8 @@ func (this *configureComp) GetEquipmentConfigureById(equipmentId string) (config return } else { if configure, ok = v.(*cfg.GameEquip).GetDataMap()[equipmentId]; !ok { - err = fmt.Errorf("EquipmentConfigure not found:%s ", equipmentId) + // err = fmt.Errorf("EquipmentConfigure not found:%s ", equipmentId) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_equip, equipmentId) this.module.Errorf("err:%v", err) return } diff --git a/modules/hero/configure_comp.go b/modules/hero/configure_comp.go index 138515408..6259bd662 100644 --- a/modules/hero/configure_comp.go +++ b/modules/hero/configure_comp.go @@ -388,7 +388,8 @@ func (this *configureComp) GetShopItemsConfigure(key int32) (result *cfg.GameSho return } else { if result, ok = v.(*cfg.GameShopitem).GetDataMap()[key]; !ok { - err = fmt.Errorf("ShopConfigure not found:%d ", key) + // err = fmt.Errorf("ShopConfigure not found:%d ", key) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_shopitem, key) this.module.Errorf("err:%v", err) return } diff --git a/modules/moonfantasy/configure.go b/modules/moonfantasy/configure.go index a88475af2..935ede379 100644 --- a/modules/moonfantasy/configure.go +++ b/modules/moonfantasy/configure.go @@ -1,7 +1,6 @@ package moonfantasy import ( - "fmt" "go_dreamfactory/comm" "go_dreamfactory/modules" cfg "go_dreamfactory/sys/configure/structs" @@ -64,7 +63,7 @@ func (this *configureComp) GetMonsterById(id string) (result *cfg.GameDreamlandB return } else { if result, ok = v.(*cfg.GameDreamlandBoos).GetDataMap()[id]; !ok { - err = fmt.Errorf("not found:%s ", id) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_dreamlandboos, id) this.module.Errorln(err) return } @@ -83,7 +82,8 @@ func (this *configureComp) GettriggerData(ptypes int32) (result *cfg.GameDreamla return } else { if result, ok = v.(*cfg.GameDreamlandTrigger).GetDataMap()[ptypes]; !ok { - err = fmt.Errorf("not found:%d ", ptypes) + // err = fmt.Errorf("not found:%d ", ptypes) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_dreamlandtrigger, ptypes) // this.module.Errorln(err) return } diff --git a/modules/parkour/configure.go b/modules/parkour/configure.go index 427e5cbf6..e78c91728 100644 --- a/modules/parkour/configure.go +++ b/modules/parkour/configure.go @@ -2,6 +2,7 @@ package parkour import ( "fmt" + "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/modules" "go_dreamfactory/sys/configure" @@ -66,7 +67,8 @@ func (this *configureComp) getGameBuzkashiReward(id int32) (configure *cfg.GameB if v, err := this.GetConfigure(game_buzkashireward); err == nil { var ok bool if configure, ok = v.(*cfg.GameBuzkashiReward).GetDataMap()[id]; !ok { - err = fmt.Errorf("not found:%d ", id) + // err = fmt.Errorf("not found:%d ", id) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_buzkashireward, id) this.module.Errorln(err) return } diff --git a/modules/practice/configure.go b/modules/practice/configure.go index af6ea49a3..978c83e32 100644 --- a/modules/practice/configure.go +++ b/modules/practice/configure.go @@ -82,7 +82,8 @@ func (this *configureComp) getGamePandamasMz(lv int32) (configure *cfg.GamePanda return } else { if configure, ok = v.(*cfg.GamePandamasMz).GetDataMap()[lv]; !ok { - err = fmt.Errorf("not found:%d ", lv) + // err = fmt.Errorf("not found:%d ", lv) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_pandamasmz, lv) this.module.Errorln(err) return } @@ -113,7 +114,8 @@ func (this *configureComp) getGamePandamasJx(id string) (configure *cfg.GamePand return } else { if configure, ok = v.(*cfg.GamePandamasJx).GetDataMap()[id]; !ok { - err = fmt.Errorf("not found:%s ", id) + // err = fmt.Errorf("not found:%s ", id) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_pandamasjx, id) this.module.Errorln(err) return } @@ -131,7 +133,8 @@ func (this *configureComp) getGamePandamasYxjx(id int32) (configure *cfg.GamePan return } else { if configure, ok = v.(*cfg.GamePandamasYxjx).GetDataMap()[id]; !ok { - err = fmt.Errorf("not found:%d", id) + // err = fmt.Errorf("not found:%d", id) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_pandamasyxjx, id) this.module.Errorln(err) return } @@ -162,7 +165,8 @@ func (this *configureComp) getPandamasMryl(id int32) (configure *cfg.GamePandama return } else { if configure, ok = v.(*cfg.GamePandamasMryl).GetDataMap()[id]; !ok { - err = fmt.Errorf("not found:%d ", id) + // err = fmt.Errorf("not found:%d ", id) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_pandamasmryl, id) this.module.Errorln(err) return } @@ -220,7 +224,8 @@ func (this *configureComp) getDispatchBattleData(id int32) (configure *cfg.GameD return } else { if configure, ok = v.(*cfg.GameDispatch_Battle).GetDataMap()[id]; !ok { - err = fmt.Errorf("not found:%d ", id) + // err = fmt.Errorf("not found:%d ", id) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_dispatch_battle, id) this.module.Errorln(err) return } diff --git a/modules/shop/configure.go b/modules/shop/configure.go index bc526fcbe..2a89dbc42 100644 --- a/modules/shop/configure.go +++ b/modules/shop/configure.go @@ -44,7 +44,8 @@ func (this *configureComp) GetShopConfigure(id int32) (configure *cfg.GameShopDa return } else { if configure, ok = v.(*cfg.GameShop).GetDataMap()[id]; !ok { - err = fmt.Errorf("ShopConfigure not found:%d ", id) + // err = fmt.Errorf("ShopConfigure not found:%d ", id) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_shop, id) this.module.Errorf("err:%v", err) return } @@ -63,7 +64,8 @@ func (this *configureComp) GetShopItemsConfigure(key int32) (result *cfg.GameSho return } else { if result, ok = v.(*cfg.GameShopitem).GetDataMap()[key]; !ok { - err = fmt.Errorf("ShopConfigure not found:%d ", key) + // err = fmt.Errorf("ShopConfigure not found:%d ", key) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_shopitem, key) this.module.Errorf("err:%v", err) return }