protected override void OnClientLeave(object sender, EventArgs eventArgs) { var client = sender as SCONClient; PlayersToRemove.Add(client); base.OnClientLeave(sender, eventArgs); }
protected override void OnClientLeave(object sender, EventArgs eventArgs) { if (!(sender is PokeDPlayer client)) { return; } SendPacketToAll(new ChatGlobalMessagePacket { Message = $"Player {client.Name} disconnected!" }); PlayersToRemove.Add(client); base.OnClientLeave(sender, eventArgs); }