From 0c6d22d3f4a045bea8a821c310fe81849962aff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E5=BF=B5?= <12574910+72wo@users.noreply.github.com> Date: Fri, 30 Jan 2026 01:34:07 +0800 Subject: [PATCH] =?UTF-8?q?```=20feat(player):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=9C=8D=E4=B8=8D=E4=BF=9D=E5=AD=98=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E6=95=B0=E6=8D=AE=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当服务器配置为VIP模式时,系统将记录日志并跳过玩家数据保存操作, 避免测试环境中的数据写入影响正式数据。 ``` --- modules/player/service/info.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/player/service/info.go b/modules/player/service/info.go index 7f88f8c8..1fe2a3f3 100644 --- a/modules/player/service/info.go +++ b/modules/player/service/info.go @@ -197,7 +197,11 @@ func (s *InfoService) Kick(id uint32) error { return nil } func (s *InfoService) Save(data model.PlayerInfo) { + if cool.Config.ServerInfo.IsVip != 0 { + cool.Logger.Info(context.TODO(), "测试服不保存玩家数据", s.userid) + return + } m := s.PModel(s.Model) var tt model.PlayerEX m.Scan(&tt)