Fixed Action Turn Right and Turn Left not moving the pets head.

This commit is contained in:
Harmonic 2022-04-07 17:49:47 -07:00
parent 42198c46bd
commit 4a68e6a4a2
2 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,7 @@ public class ActionTurnLeft extends PetAction {
@Override @Override
public boolean apply(Pet pet, Habbo habbo, String[] data) { public boolean apply(Pet pet, Habbo habbo, String[] data) {
pet.getRoomUnit().setBodyRotation(RoomUserRotation.values()[(pet.getRoomUnit().getBodyRotation().getValue() - 1 < 0 ? 7 : pet.getRoomUnit().getBodyRotation().getValue() - 1)]); pet.getRoomUnit().setBodyRotation(RoomUserRotation.values()[(pet.getRoomUnit().getBodyRotation().getValue() - 1 < 0 ? 7 : pet.getRoomUnit().getBodyRotation().getValue() - 1)]);
pet.getRoomUnit().setHeadRotation(RoomUserRotation.values()[(pet.getRoomUnit().getHeadRotation().getValue() - 1 < 0 ? 7 : pet.getRoomUnit().getHeadRotation().getValue() - 1)]);
pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL));
return true; return true;
} }

View File

@ -14,6 +14,7 @@ public class ActionTurnRight extends PetAction {
@Override @Override
public boolean apply(Pet pet, Habbo habbo, String[] data) { public boolean apply(Pet pet, Habbo habbo, String[] data) {
pet.getRoomUnit().setBodyRotation(RoomUserRotation.values()[(pet.getRoomUnit().getBodyRotation().getValue() + 1 > 7 ? 0 : pet.getRoomUnit().getBodyRotation().getValue() + 1)]); pet.getRoomUnit().setBodyRotation(RoomUserRotation.values()[(pet.getRoomUnit().getBodyRotation().getValue() + 1 > 7 ? 0 : pet.getRoomUnit().getBodyRotation().getValue() + 1)]);
pet.getRoomUnit().setHeadRotation(RoomUserRotation.values()[(pet.getRoomUnit().getHeadRotation().getValue() + 1 > 7 ? 0 : pet.getRoomUnit().getHeadRotation().getValue() + 1)]);
pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL));
return true; return true;
} }