0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-21 18:55:17 +00:00

ContainsKey is a method

This commit is contained in:
Sanae 2022-03-15 01:26:28 -06:00
parent 4dcfa2f4e6
commit e64c922966

View file

@ -17,7 +17,7 @@ server.ClientJoined += (c, _) => {
c.Metadata["loadedSave"] = false;
c.Metadata["scenario"] = 0;
c.Metadata["2d"] = false;
foreach (Client client in server.Clients.Where(client => client.Metadata["lastGamePacket"] != null).ToArray()) {
foreach (Client client in server.Clients.Where(client => client.Metadata.ContainsKey("lastGamePacket")).ToArray()) {
try {
Task.WaitAll(c.Send((GamePacket) client.Metadata["lastGamePacket"]!, client));
}