using Plus.Core;
using Plus.Database.Interfaces;
using Plus.HabboHotel.GameClients;
using Plus.HabboHotel.Users;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Plus.Communication.Packets.Outgoing.LandingView
{
    class HallOfFameComposer : ServerPacket
    {
        public HallOfFameComposer()
            : base(ServerPacketHeader.UpdateHallOfFameListMessageComposer)
        {

            base.WriteString("besthalloffame");


            base.WriteInteger(PlusEnvironment.GetGame().GetHallOfFame().BestList.Count);

            for (int i = 0; i < PlusEnvironment.GetGame().GetHallOfFame().BestList.Count; i++)
            {
                base.WriteInteger(PlusEnvironment.GetGame().GetHallOfFame().BestList[i].id);

                base.WriteString(PlusEnvironment.GetGame().GetHallOfFame().BestList[i].username);

                base.WriteString(PlusEnvironment.GetGame().GetHallOfFame().BestList[i].look);

                base.WriteInteger(i);

                base.WriteInteger(PlusEnvironment.GetGame().GetHallOfFame().BestList[i].place);

            }
        }
    }
}