钻石抽奖权重计算修改
This commit is contained in:
parent
7e28a059ae
commit
84ffbd61c9
|
|
@ -313,13 +313,14 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da
|
|||
pack := &player_proto.SCDiamondLottery{}
|
||||
|
||||
weight := 0
|
||||
p.SnId = 102060301
|
||||
var items []*Item
|
||||
for i := 1; i <= int(count); i++ {
|
||||
for _, lotteryInfo := range config.Info {
|
||||
if lotteryInfo.Type == 1 {
|
||||
weight += int(lotteryInfo.Oddrate)
|
||||
}
|
||||
}
|
||||
var items []*Item
|
||||
for i := 1; i <= int(count); i++ {
|
||||
random := rand.Intn(weight) + 1
|
||||
value := 0
|
||||
p.DiamondLotteryScore += 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue