Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop
This commit is contained in:
commit
99b25fa635
|
|
@ -311,15 +311,14 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da
|
||||||
}
|
}
|
||||||
p.AddDiamond(-diamondNum, 0, common.GainWayDiamondLottery, "sys", "钻石抽奖")
|
p.AddDiamond(-diamondNum, 0, common.GainWayDiamondLottery, "sys", "钻石抽奖")
|
||||||
pack := &player_proto.SCDiamondLottery{}
|
pack := &player_proto.SCDiamondLottery{}
|
||||||
|
|
||||||
weight := 0
|
|
||||||
for _, lotteryInfo := range config.Info {
|
|
||||||
if lotteryInfo.Type == 1 {
|
|
||||||
weight += int(lotteryInfo.Oddrate)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var items []*Item
|
var items []*Item
|
||||||
for i := 1; i <= int(count); i++ {
|
for i := 1; i <= int(count); i++ {
|
||||||
|
weight := 0
|
||||||
|
for _, lotteryInfo := range config.Info {
|
||||||
|
if lotteryInfo.Type == 1 {
|
||||||
|
weight += int(lotteryInfo.Oddrate)
|
||||||
|
}
|
||||||
|
}
|
||||||
random := rand.Intn(weight) + 1
|
random := rand.Intn(weight) + 1
|
||||||
value := 0
|
value := 0
|
||||||
p.DiamondLotteryScore += 1
|
p.DiamondLotteryScore += 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue