开发模式每分钟保存一次玩家数据

This commit is contained in:
sk 2024-09-11 13:37:46 +08:00
parent 07bea1ac2f
commit cc882657a4
1 changed files with 6 additions and 1 deletions

View File

@ -1799,7 +1799,12 @@ func (this *Player) CanDelete() bool {
}
func (this *Player) Time2Save() {
this.Save(false)
logger.Logger.Tracef("player save %v", this.SnId)
if common.Config.IsDevMode {
this.Save(true)
} else {
this.Save(false)
}
if this != nil && this.CanDelete() {
PlayerMgrSington.DelPlayer(this.SnId)
}