using Fiesta.Login.Worlds.Networking.PacketTypes;
using Fiesta.Networking.Packets;
using Fiesta.Worlds;
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 StatusUpdate
	{
		[PacketHandler("World", MISC.STATUS_UPDATE)]
		public static void Handle(WorldConnection client, InPacket packet)
		{
			if (client.World != null)
			{
				client.World.Status = (World.WorldStatus)packet.ReadByte();
			}
			else
			{
				client.Disconnect();
			}
		}
	}
}