From cc882657a4ec19cd558d58177513e5bdd2307ef7 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Wed, 11 Sep 2024 13:37:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E6=A8=A1=E5=BC=8F=E6=AF=8F?= =?UTF-8?q?=E5=88=86=E9=92=9F=E4=BF=9D=E5=AD=98=E4=B8=80=E6=AC=A1=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/player.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/worldsrv/player.go b/worldsrv/player.go index cd756c5..39e4967 100644 --- a/worldsrv/player.go +++ b/worldsrv/player.go @@ -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) }