From 024609c29b0ba295e7f191277e3af0a9bc3e1f49 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 21 Nov 2022 16:29:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=BD=E5=87=BA5=E6=98=9F=E8=8B=B1=E9=9B=84?= =?UTF-8?q?=E5=90=8EA=E6=AC=A1=E6=8A=BD=E5=A5=96=E5=86=85=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E5=86=8D=E6=8A=BD=E5=88=B05=E6=98=9F=E8=8B=B1?= =?UTF-8?q?=E9=9B=84=EF=BC=88=E6=99=AE=E9=80=9A=E5=8D=A1=E6=B1=A0+?= =?UTF-8?q?=E9=98=B5=E8=90=A5=E5=8D=A1=E6=B1=A0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/api_drawCard.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/hero/api_drawCard.go b/modules/hero/api_drawCard.go index d91f3cca6..eed2c9110 100644 --- a/modules/hero/api_drawCard.go +++ b/modules/hero/api_drawCard.go @@ -108,6 +108,7 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq } } } else { // 所有阵营抽卡都走这里 + drawCount += req.DrawCount if req.DrawCount == 1 { switch req.DrawType { case 1: @@ -197,6 +198,12 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq if v, ok := _data[int32(star)]; ok { if int32(len(v)) > randomIndex { + if star == 5 { // 抽出5星英雄后A次抽奖内不会再抽到5星英雄(普通卡池+阵营卡池) + curDrawCount := drawCount - req.DrawCount + newID := this.module.ContinuousRestriction(session.GetUserId(), v[randomIndex].Id, curDrawCount+int32(index), strPool[index]) + szCards = append(szCards, newID) + continue + } szCards = append(szCards, v[randomIndex].Id) } } @@ -215,6 +222,7 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq return } for _, heroId := range szCards { + _mapAddHero[heroId]++ } code = this.module.CreateRepeatHeros(session, _mapAddHero, true)