Пример #1
0
        static void GetWeeklyWorld(Client client, Packet msg)
        {
            try
            {
                int week = DateTime.Now.Subtract(new DateTime(2020, 1, 1, 0, 0, 0)).Days / 7;

                World world = DataBase.GetWeekly(week).Value;

                client.Send(new Packet(PacketCode.GetWeeklyWorld, PacketInfo.Success, world.ToCompressed()));
            }
            catch (Exception)
            {
                client.Send(new Packet(PacketCode.GetWeeklyWorld, PacketInfo.Error));
            }
        }