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

import net.cobem.grizzly.communication.EventResponse;
import net.cobem.grizzly.communication.HeaderLibrary;
import net.cobem.grizzly.habbohotel.rooms.items.FloorItem;

public class UpdateFloorItemComposer {
    public static EventResponse compose(int ID, FloorItem Item, int Owner) {
        EventResponse Message = new EventResponse();

        Message.Initialize(HeaderLibrary.UpdateFloorItemEvent);
        Message.addInt(ID);
        Message.addInt(Item.getBase().Sprite);
        Message.addInt(Item.X);
        Message.addInt(Item.Y);
        Message.addInt(Item.Rotation);
        Message.addString(Item.Height.toString());
        Message.addInt(0);
        Message.addInt(0);
        Message.addString("0"); // TODO: Triggers
        Message.addInt(-1);
        Message.addInt(Item.getBase().Interaction.equals("default") ? 1 : 0);
        Message.addInt(Owner);

        return Message;
    }
}
