钻石抽奖信息渠道修改

This commit is contained in:
by 2024-07-18 11:44:49 +08:00
parent 99b25fa635
commit 49b10d0a99
1 changed files with 5 additions and 5 deletions

View File

@ -237,7 +237,7 @@ func (this *CSDiamondLotteryInfoHandler) Process(s *netlib.Session, packetid int
info := WelfareMgrSington.GetConfig(p.Platform) info := WelfareMgrSington.GetConfig(p.Platform)
if info != nil && info.DiamondLotteryConfig != nil { if info != nil && info.DiamondLotteryConfig != nil {
for _, value := range info.DiamondLotteryConfig.LotteryData { for _, value := range info.DiamondLotteryConfig.LotteryData {
if value.Channel == p.Channel { if value.Channel == p.LastChannel {
pack.MaxScore = value.MaxScore pack.MaxScore = value.MaxScore
pack.DiamondNum = value.DiamondNum pack.DiamondNum = value.DiamondNum
for _, lotteryInfo := range value.Info { for _, lotteryInfo := range value.Info {
@ -294,13 +294,13 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da
var config *webapi.DiamondLotteryData var config *webapi.DiamondLotteryData
if info != nil && info.LotteryData != nil { if info != nil && info.LotteryData != nil {
for _, value := range info.LotteryData { for _, value := range info.LotteryData {
if value.Channel == p.Channel { if value.Channel == p.LastChannel {
config = value config = value
break break
} }
} }
if config == nil { if config == nil {
logger.Logger.Error("钻石抽奖未找到配置p.Channel = ", p.Channel) logger.Logger.Error("钻石抽奖未找到配置p.LastChannel = ", p.LastChannel)
return nil return nil
} }
//判断钻石数量 //判断钻石数量
@ -443,13 +443,13 @@ func (this *CSDiamondLotteryLuckyAwardHandler) Process(s *netlib.Session, packet
var config *webapi.DiamondLotteryData var config *webapi.DiamondLotteryData
if info != nil && info.LotteryData != nil { if info != nil && info.LotteryData != nil {
for _, value := range info.LotteryData { for _, value := range info.LotteryData {
if value.Channel == p.Channel { if value.Channel == p.LastChannel {
config = value config = value
break break
} }
} }
if config == nil { if config == nil {
logger.Logger.Error("钻石抽奖未找到配置p.Channel = ", p.Channel) logger.Logger.Error("钻石抽奖未找到配置p.LastChannel = ", p.LastChannel)
return nil return nil
} }
if p.DiamondLotteryScore < int64(config.MaxScore) { if p.DiamondLotteryScore < int64(config.MaxScore) {