2018-07-06 15:30:00 +02:00
|
|
|
package com.eu.habbo.messages.outgoing.rooms.pets;
|
|
|
|
|
|
|
|
import com.eu.habbo.habbohotel.pets.HorsePet;
|
|
|
|
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 RoomPetHorseFigureComposer extends MessageComposer {
|
2018-07-06 15:30:00 +02:00
|
|
|
private final HorsePet pet;
|
|
|
|
|
2019-05-26 20:14:53 +02:00
|
|
|
public RoomPetHorseFigureComposer(HorsePet pet) {
|
2018-07-06 15:30:00 +02:00
|
|
|
this.pet = pet;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-05-26 20:14:53 +02:00
|
|
|
public ServerMessage compose() {
|
2018-07-06 15:30:00 +02:00
|
|
|
this.response.init(Outgoing.RoomPetHorseFigureComposer);
|
|
|
|
this.response.appendInt(this.pet.getRoomUnit().getId());
|
|
|
|
this.response.appendInt(this.pet.getId());
|
|
|
|
this.response.appendInt(this.pet.getPetData().getType());
|
|
|
|
this.response.appendInt(this.pet.getRace());
|
|
|
|
this.response.appendString(this.pet.getColor().toLowerCase());
|
|
|
|
|
2019-05-26 20:14:53 +02:00
|
|
|
if (this.pet.hasSaddle()) {
|
2018-07-06 15:30:00 +02:00
|
|
|
this.response.appendInt(2);
|
|
|
|
this.response.appendInt(3);
|
|
|
|
this.response.appendInt(4);
|
|
|
|
this.response.appendInt(9);
|
|
|
|
this.response.appendInt(0);
|
|
|
|
this.response.appendInt(3);
|
|
|
|
|
|
|
|
this.response.appendInt(this.pet.getHairStyle());
|
|
|
|
this.response.appendInt(this.pet.getHairColor());
|
|
|
|
this.response.appendInt(3); //Saddle type?
|
|
|
|
this.response.appendInt(this.pet.getHairStyle());
|
|
|
|
this.response.appendInt(this.pet.getHairColor());
|
2019-05-26 20:14:53 +02:00
|
|
|
} else {
|
2018-07-06 15:30:00 +02:00
|
|
|
this.response.appendInt(1);
|
|
|
|
this.response.appendInt(2);
|
|
|
|
this.response.appendInt(2);
|
|
|
|
this.response.appendInt(this.pet.getHairStyle());
|
|
|
|
this.response.appendInt(this.pet.getHairColor());
|
|
|
|
this.response.appendInt(3);
|
|
|
|
this.response.appendInt(this.pet.getHairStyle());
|
|
|
|
this.response.appendInt(this.pet.getHairColor());
|
|
|
|
}
|
|
|
|
this.response.appendBoolean(this.pet.hasSaddle());
|
2019-05-06 06:37:52 +02:00
|
|
|
this.response.appendBoolean(false); // this.pet.anyoneCanRide()
|
2018-07-06 15:30:00 +02:00
|
|
|
return this.response;
|
|
|
|
}
|
|
|
|
}
|