2024-01-19 14:45:18 +00:00
|
|
|
|
using RPG.GameCore.Excel;
|
2024-01-23 17:54:53 +00:00
|
|
|
|
using RPG.GameCore.Level;
|
2024-01-19 14:45:18 +00:00
|
|
|
|
using RPG.Services.Core;
|
2024-01-18 22:13:40 +00:00
|
|
|
|
|
|
|
|
|
namespace RPG.Services.Gameserver;
|
|
|
|
|
internal class RPGGameserver : RPGServiceBase
|
|
|
|
|
{
|
2024-01-19 14:45:18 +00:00
|
|
|
|
private readonly ExcelTables _excelTables;
|
2024-01-23 17:54:53 +00:00
|
|
|
|
private readonly LevelTables _levelTables;
|
2024-01-19 14:45:18 +00:00
|
|
|
|
|
2024-01-23 17:54:53 +00:00
|
|
|
|
public RPGGameserver(ServiceManager serviceManager, ExcelTables excelTables, LevelTables levelTables) : base(serviceManager)
|
2024-01-19 14:45:18 +00:00
|
|
|
|
{
|
|
|
|
|
_excelTables = excelTables;
|
2024-01-23 17:54:53 +00:00
|
|
|
|
_levelTables = levelTables;
|
2024-01-19 14:45:18 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task StartAsync(CancellationToken cancellationToken)
|
2024-01-18 22:13:40 +00:00
|
|
|
|
{
|
2024-01-19 14:45:18 +00:00
|
|
|
|
_excelTables.Load();
|
2024-01-23 17:54:53 +00:00
|
|
|
|
_levelTables.Load();
|
2024-01-19 14:45:18 +00:00
|
|
|
|
await base.StartAsync(cancellationToken);
|
2024-01-18 22:13:40 +00:00
|
|
|
|
}
|
|
|
|
|
}
|