diff --git a/worldsrv/tournament.go b/worldsrv/tournament.go index 06879c9..ea7676e 100644 --- a/worldsrv/tournament.go +++ b/worldsrv/tournament.go @@ -1625,16 +1625,12 @@ func (this *Tournament) Update() { } } } - //零点清除每日库存数据 - // 获取当前时间 - nowTime := time.Now() - if nowTime.Hour() == 0 && nowTime.Minute() == 0 && nowTime.Second() == 0 { - this.MatchAwardNum = make(map[string]map[int32]int32) - this.Save() - logger.Logger.Trace("比赛场每日库存清理!!!当前时间 %v", nowTime) - } } - +func (this *Tournament) OnDayTimer() { + this.MatchAwardNum = make(map[string]map[int32]int32) + this.Save() + logger.Logger.Trace("比赛场每日库存清理!!!") +} func (this *Tournament) Shutdown() { // 保存数据 this.Save()