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

import net.cobem.grizzly.communication.EventRequest;
import net.cobem.grizzly.communication.GameEvent;
import net.cobem.grizzly.habbohotel.sessions.Session;

public class SitEvent implements GameEvent {

    @Override
    public void compose(Session Session, EventRequest Request) {
        @SuppressWarnings("unused")
        int User = Request.readInt(); //Why am I recieving this?

        if (Session.getActor().hasStatus("sit") || Session.getActor().hasStatus("lay")) {
            return;
        }

        if ((Session.getActor().Rotation % 2) != 0) {
            Session.getActor().Rotation++;
        }

        Session.getActor().addStatus("sit", Session.getActor().CurrentPosition.Z + .65, true);
    }

}
