抽奖活动机器人发奖调整

This commit is contained in:
sk 2024-11-13 11:17:07 +08:00
parent f0e18b16d0
commit 28b6cb6a85
2 changed files with 19 additions and 3 deletions

View File

@ -3181,7 +3181,9 @@ func CSUpdateAttribute(s *netlib.Session, packetId int, data interface{}, sid in
} }
} else { } else {
pack.OpRetCode = player_proto.OpResultCode_OPRC_Sucess pack.OpRetCode = player_proto.OpResultCode_OPRC_Sucess
if len(msg.Param) > 0 {
p.GuideData[msg.GuideId] = int32(msg.Param[0]) p.GuideData[msg.GuideId] = int32(msg.Param[0])
}
send() send()
return nil return nil
} }

View File

@ -47,6 +47,22 @@ func init() {
} }
} }
}, },
OnMiniTimerFunc: func() {
for i := range LotteryMgrInst.Data {
for k := range LotteryMgrInst.Data[i] {
d := LotteryMgrInst.Data[i][k]
if d == nil {
continue
}
lc := PlatformMgrSingleton.GetLotteryConfig(d.Platform, d.CId)
if lc == nil || lc.GetOn() != common.On {
continue
}
// 随机给机器人发放抽奖码
d.sendRobotCode(1, 5)
}
}
},
}) })
} }
@ -477,8 +493,6 @@ func (l *LotteryMgr) Update() {
if lc == nil || lc.GetOn() != common.On { if lc == nil || lc.GetOn() != common.On {
continue continue
} }
// 随机给机器人发放抽奖码
d.sendRobotCode(1, 5)
// 活动结束,开始抽奖 // 活动结束,开始抽奖
d.Done() d.Done()
// 开始发奖 // 开始发奖