CTT/Server/Hotfix/Game/System/User/PlayerConfigSystem.cs

28 lines
663 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
using System;
using System.Collections.Generic;
using System.Text;
namespace ET
{
public class PlayerConfigComponentAwakeSystem : AwakeSystem<PlayerConfigComponent>
{
public override async void Awake(PlayerConfigComponent self)
{
2021-04-11 19:50:39 +08:00
List<PlayerConfigComponent> list = await DBComponent.Instance.QueryFilter(MongoDB.Driver.Builders<PlayerConfigComponent>.Filter.Ne(t => t.MaxPlayerId, 0), MongoDB.Driver.Builders<PlayerConfigComponent>.Sort.Descending(t=>t.MaxPlayerId));
2021-04-08 20:09:59 +08:00
if (list.Count > 0)
{
self.MaxPlayerId = list[0].MaxPlayerId;
}
else
{
self.MaxPlayerId = 10000;
}
}
}
public class PlayerConfigSystem
{
}
}