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)