Commit df9283a357ae500eaed476abef8f2e1add57b584

Authored by 王家文
1 parent 0fc53fc0
Exists in master and in 1 other branch dev-wjw

fix🐛:新卡包只是多一张新卡 其余的逻辑相同

Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
service/cardholder/logic.go
@@ -149,13 +149,15 @@ func DoOpen(gameId string, @@ -149,13 +149,15 @@ func DoOpen(gameId string,
149 149
150 newCards = make([]int, 0) 150 newCards = make([]int, 0)
151 151
  152 + // 如果是新卡包 按顺序查找数目最少的一张卡抽取
  153 + // 2024年4月25日 新卡包只是多一张新卡 其余的逻辑相同
152 if confCardholder.IsNew != 0 { 154 if confCardholder.IsNew != 0 {
153 - // 如果是新卡包 按顺序查找数目最少的一张卡抽取  
154 cardId := GetNewCard(player, config) 155 cardId := GetNewCard(player, config)
155 // 增加卡牌 156 // 增加卡牌
156 player.Details.Cards[cardId] += 1 157 player.Details.Cards[cardId] += 1
157 newCards = append(newCards, cardId) 158 newCards = append(newCards, cardId)
158 - } else { 159 + }
  160 + {
159 getCardFunc := func(cardConfigId int) { 161 getCardFunc := func(cardConfigId int) {
160 confCardSequence, hasCardSequence := config.FindCardSequenceConfig(cardConfigId, sequenceId, cohort) 162 confCardSequence, hasCardSequence := config.FindCardSequenceConfig(cardConfigId, sequenceId, cohort)
161 if hasCardSequence { 163 if hasCardSequence {