Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop

This commit is contained in:
sk 2024-10-25 13:50:38 +08:00
commit e20a82fba6
2 changed files with 44 additions and 12 deletions

View File

@ -1000,16 +1000,20 @@ func (this *SceneHandCardStateTienLen) OnEnter(s *base.Scene) {
sceneEx.SendHandCardOdds()
}
}*/
if sceneEx.WGCreateScene.GetCloseCtrl() {
sceneEx.RandomCards()
if len(sceneEx.testPokers) > 1 {
sceneEx.SendHandCardOdds()
} else {
if sceneEx.IsMatchScene() || sceneEx.IsCustom() {
sceneEx.SendHandCard_Match()
if sceneEx.WGCreateScene.GetCloseCtrl() {
sceneEx.RandomCards()
} else {
sceneEx.SendHandCardOdds()
if sceneEx.IsMatchScene() || sceneEx.IsCustom() {
sceneEx.SendHandCard_Match()
} else {
sceneEx.SendHandCardOdds()
}
}
}
}
for _, seat := range sceneEx.seats {

View File

@ -25,6 +25,39 @@ var InviteLogMgrInstance = com.NewListMgr[*model.InviteInfo](
return ret, nil
})
var RobotInviteMgr = &RobotManager{}
type RobotManager struct {
}
func (this *RobotManager) InterestClockEvent() int {
return 1 << common.ClockEventDay
}
func (this *RobotManager) OnMonthTimer() {
}
func (this *RobotManager) ClockEventMax() {
return
}
func (this *RobotManager) OnSecTimer() {
}
func (this *RobotManager) OnMiniTimer() {
}
func (this *RobotManager) OnHourTimer() {
}
func (this *RobotManager) OnWeekTimer() {
}
func (this *RobotManager) OnShutdown() {
}
func (this *RobotManager) OnDayTimer() {
RobotRandon()
}
func RobotRandon() {
//机器人随机
robotNum := rand.Intn(21) + 10
@ -53,10 +86,5 @@ func RobotRandon() {
})).StartByFixExecutor("SaveRankInviteTask")
}
func init() {
common.RegisterClockFunc(&common.ClockFunc{
OnDayTimerFunc: func() {
RobotRandon()
logger.Logger.Trace("邀请积分排行榜0点机器人随机完成")
},
})
common.ClockMgrSingleton.RegisterSinker(RobotInviteMgr)
}