command yay!

This commit is contained in:
rfi
2023-11-13 19:10:02 +07:00
parent 21856d353b
commit 6c5aca3c3a
12 changed files with 335 additions and 36 deletions

View File

@@ -19,12 +19,16 @@ namespace AscNet.GameServer
}
}
public Server()
static Server()
{
// TODO: add loglevel based on appsettings
LogLevel logLevel = LogLevel.DEBUG;
LogLevel fileLogLevel = LogLevel.DEBUG;
log = new(typeof(Server), logLevel, fileLogLevel);
}
public Server()
{
listener = new(IPAddress.Parse("0.0.0.0"), Common.Common.config.GameServer.Port);
}
@@ -54,5 +58,10 @@ namespace AscNet.GameServer
}
}
}
public Session? SessionFromUID(long uid)
{
return Sessions.FirstOrDefault(x => x.Value.player.PlayerData.Id == uid).Value;
}
}
}