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 } } }