using Fiesta.Game.Networking.PacketTypes;
using Fiesta.Networking.Packets;
using Fiesta.Worlds.Networking;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Villain.Networking.Packets;

namespace Login.Worlds.Networking.Packets.Misc.In
{
	public static class UserCount
	{
		[PacketHandler("World", MISC.USER_COUNT_CMD)]
		public static void Handle(WorldConnection client, InPacket packet)
		{
			UInt16 userCount = packet.ReadUInt16();
			UInt16 maxUserCount = packet.ReadUInt16();

			// TODO: Update the client.World status based on percentage of users connected

			client.World.Status = Fiesta.Worlds.World.WorldStatus.Low;
		}
	}
}