From fa7c1bb404d358331c8c56bdaf90034d259c3250 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 19 Dec 2023 19:28:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E5=BF=83=E6=84=BF=E8=8B=B1?= =?UTF-8?q?=E9=9B=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/api_drawCard.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/hero/api_drawCard.go b/modules/hero/api_drawCard.go index 4ecd669a3..fab704a68 100644 --- a/modules/hero/api_drawCard.go +++ b/modules/hero/api_drawCard.go @@ -247,7 +247,7 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq tmp4 = this.module.ModuleTools.GetGlobalConf().RewardStar4 var tmp5 *cfg.Gameatn tmp5 = this.module.ModuleTools.GetGlobalConf().RewardStar5 - for _, heroId := range szCards { + for i, heroId := range szCards { HeroConf, _ := this.module.configure.GetHeroConfig(heroId) szStar = append(szStar, HeroConf.Star) // 获得许愿石 if HeroConf.Star == 4 { @@ -272,6 +272,7 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq } } heroId = heroRecord.LimitHero // 替换成心愿英雄 + szCards[i] = heroId } } }