This commit is contained in:
aozhiwei 2024-09-20 15:30:16 +08:00
parent 702f721fea
commit 1501e2f17b

View File

@ -2,6 +2,7 @@ package history
import (
"q5"
"f5"
"cs"
"jccommon"
"main/common"
@ -52,9 +53,15 @@ func (this *historyMgr) PushLastBattleInfo(hum common.Player) {
func (this *historyMgr) CanStart(accountId string, mapId int32, modeId int32) bool {
u := this.getUser(accountId)
if u == nil {
if u == nil && modeId == jccommon.MAP_MODE_CIRCUIT {
key := q5.MkInt64(mapId, modeId)
if startTime, ok := u.mapAndModeHash[key]; ok {
nowTime := q5.ToInt32(f5.GetApp().GetRealSeconds())
if nowTime - startTime < mt.Table.Config.Get().GetCircuitModeIntervalTime() {
return false
}
}
}
return true
}