fix: 修复重复领取奖励的问题
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-21 01:01:05 +08:00
committed by cnb
parent 1969c01f3e
commit 6717ca5236

View File

@@ -55,9 +55,11 @@ func (h Controller) GET_XUANCAI(data *C2s_GET_XUANCAI, c *player.Player) (result
// 检查该位是否未被选中(避免重复)
if (result.Status & mask) == 0 {
c.ItemAdd(400686+int64(randBitIdx)+1, 1)
result.Status |= mask // 标记该位为选中
selectedCount++ // 选中数+1
if c.ItemAdd(400686+int64(randBitIdx)+1, 1) {
result.Status |= mask // 标记该位为选中
}
selectedCount++ // 选中数+1
}
}
return