From ac608e99a2c00a9d6bc83b878332219b3a9ad8dd Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Mon, 18 Sep 2023 19:09:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=94=99=E8=AF=AF=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/battle/configure.go | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/modules/battle/configure.go b/modules/battle/configure.go index 73ec401fe..2aca2452f 100644 --- a/modules/battle/configure.go +++ b/modules/battle/configure.go @@ -94,7 +94,8 @@ func (this *configureComp) GetMonsterFormat(id int32) (result []*cfg.GameMonster if result, ok = this.mformat[id]; ok { return } - err = fmt.Errorf("GetMonsterFormat no found :%d", id) + // err = fmt.Errorf("GetMonsterFormat no found :%d", id) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_monsterformat, id) this.module.Errorln(err) return } @@ -128,6 +129,7 @@ func (this *configureComp) getPandamasBuff(id int32) (configure *cfg.GamePandama } else { if configure, ok = v.(*cfg.GamePandamasBuff).GetDataMap()[id]; !ok { // err = fmt.Errorf("not found:%d ", id) + // err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_pandamasbuff, id) err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_pandamasbuff, id) this.module.Errorln(err) return @@ -146,7 +148,8 @@ func (this *configureComp) Getequipsuit(id int32) (result *cfg.GameEquipSuitData this.module.Errorln(err) } else { if result, ok = v.(*cfg.GameEquipSuit).GetDataMap()[id]; !ok { - err = fmt.Errorf("on found Getequipsuit:%d", id) + // err = fmt.Errorf("on found Getequipsuit:%d", id) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_equipsuit, id) this.module.Errorln(err) } } @@ -163,7 +166,8 @@ func (this *configureComp) GetBattlereadyCapskill(id int32) (result *cfg.GameBat this.module.Errorln(err) } else { if result, ok = v.(*cfg.GameBattleready_capskill).GetDataMap()[id]; !ok { - err = fmt.Errorf("on found BattlereadyCapskill:%d", id) + // err = fmt.Errorf("on found BattlereadyCapskill:%d", id) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_battleready_capskill, id) this.module.Errorln(err) } } @@ -177,6 +181,7 @@ func (this *configureComp) GetSkillAtk(skillId int32, skillLv int32) (result *cf return } } + // err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_skillafteratk, skillId) err = fmt.Errorf("no found SkillAtk skillId:%d skillLv%d", skillId, skillLv) this.module.Errorln(err.Error()) return @@ -192,7 +197,8 @@ func (this *configureComp) GetSkillAfteratk(skillId int32) (result *cfg.GameSkil this.module.Errorln(err) } else { if result, ok = v.(*cfg.GameSkillAfteratk).GetDataMap()[skillId]; !ok { - err = fmt.Errorf("on found SkillAfteratk skillId:%d", skillId) + // err = fmt.Errorf("on found SkillAfteratk skillId:%d", skillId) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_skillafteratk, skillId) this.module.Errorln(err.Error()) } } @@ -209,7 +215,8 @@ func (this *configureComp) GetSkillBuff(skillId int32) (result *cfg.GameSkillBuf this.module.Errorln(err) } else { if result, ok = v.(*cfg.GameSkillBuff).GetDataMap()[skillId]; !ok { - err = fmt.Errorf("on found SkillAfteratk skillId:%d", skillId) + // err = fmt.Errorf("on found SkillAfteratk skillId:%d", skillId) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_skillbuff, skillId) this.module.Errorln(err.Error()) } } @@ -226,7 +233,8 @@ func (this *configureComp) GetSkillPassive(skillId int32) (result *cfg.GameSkill this.module.Errorln(err) } else { if result, ok = v.(*cfg.GameSkillPassive).GetDataMap()[skillId]; !ok { - err = fmt.Errorf("on found SkillAfteratk skillId:%d", skillId) + // err = fmt.Errorf("on found SkillAfteratk skillId:%d", skillId) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_skillpassive, skillId) this.module.Errorln(err.Error()) } } @@ -242,7 +250,7 @@ func (this *configureComp) GetBattleTask(battle int32) (result *cfg.GameBattleta this.module.Errorln(err) } else { if result, ok = v.(*cfg.GameBattletasktesting).GetDataMap()[battle]; !ok { - err = fmt.Errorf("on found GetBattleTask battle:%d", battle) + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_battletasktesting, battle) this.module.Errorln(err.Error()) } }