package net.cobem.grizzly.communication.composers.catalog;

import net.cobem.grizzly.communication.EventResponse;
import net.cobem.grizzly.communication.HeaderLibrary;
import net.cobem.grizzly.habbohotel.rooms.Room;

import java.util.Map;

public class SendPromotedRoomsCreationDataComposer {

    public static EventResponse compose(Map<Integer, Room> Rooms) {
        EventResponse Message = new EventResponse();

        Message.Initialize(HeaderLibrary.SendPromotedRoomsCreationDataEvent);

        Message.addBool(false);
        Message.addInt(Rooms.size());

        for(Room mRoom : Rooms.values()) {
            Message.addInt(mRoom.ID);
            Message.addString(mRoom.Title);
            Message.addBool(false);
        }
        return Message;
    }
}
