1
This commit is contained in:
parent
702f721fea
commit
1501e2f17b
@ -2,6 +2,7 @@ package history
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"q5"
|
"q5"
|
||||||
|
"f5"
|
||||||
"cs"
|
"cs"
|
||||||
"jccommon"
|
"jccommon"
|
||||||
"main/common"
|
"main/common"
|
||||||
@ -52,8 +53,14 @@ func (this *historyMgr) PushLastBattleInfo(hum common.Player) {
|
|||||||
|
|
||||||
func (this *historyMgr) CanStart(accountId string, mapId int32, modeId int32) bool {
|
func (this *historyMgr) CanStart(accountId string, mapId int32, modeId int32) bool {
|
||||||
u := this.getUser(accountId)
|
u := this.getUser(accountId)
|
||||||
if u == nil {
|
if u == nil && modeId == jccommon.MAP_MODE_CIRCUIT {
|
||||||
return false
|
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
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user