钻石抽奖权重计算修改
This commit is contained in:
parent
116d521789
commit
da8a0f1a45
|
|
@ -311,10 +311,9 @@ 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
|
|
||||||
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 {
|
for _, lotteryInfo := range config.Info {
|
||||||
if lotteryInfo.Type == 1 {
|
if lotteryInfo.Type == 1 {
|
||||||
weight += int(lotteryInfo.Oddrate)
|
weight += int(lotteryInfo.Oddrate)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue