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

28 lines
663 B
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace ET
{
public class PlayerConfigComponentAwakeSystem : AwakeSystem<PlayerConfigComponent>
{
public override async void Awake(PlayerConfigComponent self)
{
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));
if (list.Count > 0)
{
self.MaxPlayerId = list[0].MaxPlayerId;
}
else
{
self.MaxPlayerId = 10000;
}
}
}
public class PlayerConfigSystem
{
}
}