钻石抽奖权重计算修改

This commit is contained in:
by 2024-07-17 15:17:15 +08:00
parent 116d521789
commit da8a0f1a45
1 changed files with 1 additions and 2 deletions

View File

@ -311,10 +311,9 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da
}
p.AddDiamond(-diamondNum, 0, common.GainWayDiamondLottery, "sys", "钻石抽奖")
pack := &player_proto.SCDiamondLottery{}
weight := 0
var items []*Item
for i := 1; i <= int(count); i++ {
weight := 0
for _, lotteryInfo := range config.Info {
if lotteryInfo.Type == 1 {
weight += int(lotteryInfo.Oddrate)