You've already forked Arcturus-Morningstar-Extended
mirror of
https://github.com/duckietm/Arcturus-Morningstar-Extended.git
synced 2026-06-20 07:26:18 +00:00
🆙 Fix Breeding
This commit is contained in:
+3
-1
@@ -207,7 +207,9 @@ public class InteractionPetBreedingNest extends HabboItem {
|
|||||||
offspring.run();
|
offspring.run();
|
||||||
InteractionPetBreedingNest.this.freePets();
|
InteractionPetBreedingNest.this.freePets();
|
||||||
habbo.getHabboInfo().getCurrentRoom().removeHabboItem(box);
|
habbo.getHabboInfo().getCurrentRoom().removeHabboItem(box);
|
||||||
habbo.getClient().sendResponse(new PetBreedingCompleted(offspring.getId(), Emulator.getGameEnvironment().getPetManager().getRarityForOffspring(offspring)));
|
habbo.getClient().sendResponse(
|
||||||
|
new PetBreedingCompleted(PetBreedingCompleted.STATE_ACCEPT, petOneId, petTwoId)
|
||||||
|
);
|
||||||
|
|
||||||
if (box.getBaseItem().getName().startsWith("pet_breeding_")) {
|
if (box.getBaseItem().getName().startsWith("pet_breeding_")) {
|
||||||
String boxType = box.getBaseItem().getName().replace("pet_breeding_", "");
|
String boxType = box.getBaseItem().getName().replace("pet_breeding_", "");
|
||||||
|
|||||||
+22
-19
@@ -4,28 +4,31 @@ import com.eu.habbo.messages.ServerMessage;
|
|||||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||||
|
|
||||||
public class PetBreedingCompleted extends MessageComposer {
|
public class PetBreedingCompleted extends MessageComposer
|
||||||
private final int type;
|
{
|
||||||
private final int race;
|
// match your Nitro parser constants
|
||||||
|
public static final int STATE_CANCEL = 1;
|
||||||
|
public static final int STATE_ACCEPT = 2;
|
||||||
|
public static final int STATE_REQUEST = 3;
|
||||||
|
|
||||||
public PetBreedingCompleted(int type, int race) {
|
private final int state;
|
||||||
this.type = type;
|
private final int ownPetId;
|
||||||
this.race = race;
|
private final int otherPetId;
|
||||||
|
|
||||||
|
public PetBreedingCompleted(int state, int ownPetId, int otherPetId)
|
||||||
|
{
|
||||||
|
this.state = state;
|
||||||
|
this.ownPetId = ownPetId;
|
||||||
|
this.otherPetId = otherPetId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ServerMessage composeInternal() {
|
protected ServerMessage composeInternal()
|
||||||
this.response.init(Outgoing.PetBreedingCompleted);
|
{
|
||||||
this.response.appendInt(this.type);
|
this.response.init(Outgoing.PetBreedingCompleted); // 2527
|
||||||
this.response.appendInt(this.race);
|
this.response.appendInt(this.state);
|
||||||
|
this.response.appendInt(this.ownPetId);
|
||||||
|
this.response.appendInt(this.otherPetId);
|
||||||
return this.response;
|
return this.response;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public int getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getRace() {
|
|
||||||
return race;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user