diff --git a/worldsrv/action_pushcoin.go b/worldsrv/action_pushcoin.go index 08a4634..af10631 100644 --- a/worldsrv/action_pushcoin.go +++ b/worldsrv/action_pushcoin.go @@ -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())