fix 推币机奖池抽奖

This commit is contained in:
sk 2025-01-18 15:03:37 +08:00
parent 532c7574ad
commit 6265822463
1 changed files with 13 additions and 6 deletions

View File

@ -620,6 +620,11 @@ func PushCoinDraw(p *Player) {
break
}
}
if has && index == int(curIndex) {
// 重复
has = false
}
if !has {
// 替换
if slices.Contains(PoolIndex, index) {
@ -633,12 +638,14 @@ func PushCoinDraw(p *Player) {
})
p.WelfData.PushCoin.Turn[index] = e.GetId()
} else {
p.WelfData.PushCoin.Turn[curIndex] = e1.GetId()
draw1 = append(draw1, &activity.DrawInfo{
Id: curIndex,
ItemId: e1.GetItemId(),
ItemNum: e1.GetItemNum(),
})
if !slices.Contains(PoolIndex, int(curIndex)) {
p.WelfData.PushCoin.Turn[curIndex] = e1.GetId()
draw1 = append(draw1, &activity.DrawInfo{
Id: curIndex,
ItemId: e1.GetItemId(),
ItemNum: e1.GetItemNum(),
})
}
}
p.WelfData.PushCoin.Next = int32(index)
logger.Logger.Tracef("下次中普通奖品index:%v ItemId:%v Num:%v", index, e.GetItemId(), e.GetItemNum())