feat(player): 添加测试服不保存玩家数据的功能 当服务器配置为VIP模式时,系统将记录日志并跳过玩家数据保存操作, 避免测试环境中的数据写入影响正式数据。 ```
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user