From a58a7ddb0c26482dfe880540008995ece497f3f0 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 18 Dec 2023 18:05:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/configure_comp.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/hero/configure_comp.go b/modules/hero/configure_comp.go index d3047e27a..fde75cc99 100644 --- a/modules/hero/configure_comp.go +++ b/modules/hero/configure_comp.go @@ -449,7 +449,9 @@ func (this *configureComp) GetHeroMaxLv(star int32) int32 { if v, err := this.GetConfigure(hero_stargrow); err == nil { if configure, ok := v.(*cfg.GameHeroStargrow); ok { - return configure.Get(star).Maxlevel + if configure.Get(star) != nil { + return configure.Get(star).Maxlevel + } } } this.module.Errorf(" GetHeroMaxLv err : star:%d", star)