diff --git a/gamesrv/tienlen/scenepolicy_tienlen.go b/gamesrv/tienlen/scenepolicy_tienlen.go index 5965abc..c62b886 100644 --- a/gamesrv/tienlen/scenepolicy_tienlen.go +++ b/gamesrv/tienlen/scenepolicy_tienlen.go @@ -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 { diff --git a/ranksrv/rank/invitelog.go b/ranksrv/rank/invitelog.go index e0a89f8..c9bd649 100644 --- a/ranksrv/rank/invitelog.go +++ b/ranksrv/rank/invitelog.go @@ -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) }