Arcturus-Community/src/main/java/com/eu/habbo/core/RoomUserPetComposer.java

50 lines
2.1 KiB
Java
Raw Normal View History

2018-07-06 15:30:00 +02:00
package com.eu.habbo.core;
import com.eu.habbo.habbohotel.users.Habbo;
import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.outgoing.MessageComposer;
import com.eu.habbo.messages.outgoing.Outgoing;
2019-05-26 20:14:53 +02:00
public class RoomUserPetComposer extends MessageComposer {
2018-07-06 15:30:00 +02:00
private final int petType;
private final int race;
private final String color;
private final Habbo habbo;
2019-05-26 20:14:53 +02:00
public RoomUserPetComposer(int petType, int race, String color, Habbo habbo) {
2018-07-06 15:30:00 +02:00
this.petType = petType;
this.race = race;
this.color = color;
this.habbo = habbo;
}
@Override
protected ServerMessage composeInternal() {
2018-07-06 15:30:00 +02:00
this.response.init(Outgoing.RoomUsersComposer);
this.response.appendInt(1);
this.response.appendInt(this.habbo.getHabboInfo().getId());
this.response.appendString(this.habbo.getHabboInfo().getUsername());
this.response.appendString("");
this.response.appendString(this.petType + " " + this.race + " " + this.color + " 2 2 -1 0 3 -1 0");
2019-03-18 02:22:00 +01:00
this.response.appendInt(this.habbo.getRoomUnit().getId());
this.response.appendInt(this.habbo.getRoomUnit().getX());
this.response.appendInt(this.habbo.getRoomUnit().getY());
this.response.appendString(this.habbo.getRoomUnit().getZ() + "");
this.response.appendInt(this.habbo.getRoomUnit().getBodyRotation().getValue());
2018-07-06 15:30:00 +02:00
this.response.appendInt(2);
this.response.appendInt(this.petType);
this.response.appendInt(this.habbo.getHabboInfo().getId());
this.response.appendString(this.habbo.getHabboInfo().getUsername());
this.response.appendInt(1);
this.response.appendBoolean(false);
this.response.appendBoolean(true);
this.response.appendBoolean(true); //Can toggle breeding permissions.
this.response.appendBoolean(true);
this.response.appendBoolean(true); //Can treat?
this.response.appendBoolean(true); //Can breed
this.response.appendInt(0);
this.response.appendString("");
return this.response;
}
}