mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Fix ActionDown
This commit is contained in:
parent
516560f603
commit
6625e4edc4
@ -1,5 +1,6 @@
|
|||||||
package com.eu.habbo.habbohotel.pets.actions;
|
package com.eu.habbo.habbohotel.pets.actions;
|
||||||
|
|
||||||
|
import com.eu.habbo.Emulator;
|
||||||
import com.eu.habbo.habbohotel.pets.Pet;
|
import com.eu.habbo.habbohotel.pets.Pet;
|
||||||
import com.eu.habbo.habbohotel.pets.PetAction;
|
import com.eu.habbo.habbohotel.pets.PetAction;
|
||||||
import com.eu.habbo.habbohotel.pets.PetTasks;
|
import com.eu.habbo.habbohotel.pets.PetTasks;
|
||||||
@ -10,13 +11,21 @@ import com.eu.habbo.habbohotel.users.Habbo;
|
|||||||
public class ActionDown extends PetAction {
|
public class ActionDown extends PetAction {
|
||||||
public ActionDown() {
|
public ActionDown() {
|
||||||
super(PetTasks.DOWN, true);
|
super(PetTasks.DOWN, true);
|
||||||
|
this.statusToRemove.add(RoomUnitStatus.BEG);
|
||||||
this.statusToRemove.add(RoomUnitStatus.MOVE);
|
this.statusToRemove.add(RoomUnitStatus.MOVE);
|
||||||
this.statusToRemove.add(RoomUnitStatus.SIT);
|
this.statusToRemove.add(RoomUnitStatus.DEAD);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Pet pet, Habbo habbo, String[] data) {
|
public boolean apply(Pet pet, Habbo habbo, String[] data) {
|
||||||
pet.getRoomUnit().setStatus(RoomUnitStatus.LAY, pet.getRoom().getStackHeight(pet.getRoomUnit().getX(), pet.getRoomUnit().getY(), false) + "");
|
if (pet.getTask() != PetTasks.DOWN && !pet.getRoomUnit().hasStatus(RoomUnitStatus.LAY)) {
|
||||||
|
pet.getRoomUnit().cmdLay = true;
|
||||||
|
pet.getRoomUnit().setStatus(RoomUnitStatus.LAY, pet.getRoomUnit().getCurrentLocation().getStackHeight() + "");
|
||||||
|
|
||||||
|
Emulator.getThreading().run(() -> {
|
||||||
|
pet.getRoomUnit().cmdLay = false;
|
||||||
|
pet.clearPosture();
|
||||||
|
}, 4000);
|
||||||
|
|
||||||
if (pet.getHappyness() > 50)
|
if (pet.getHappyness() > 50)
|
||||||
pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL));
|
pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL));
|
||||||
@ -25,4 +34,7 @@ public class ActionDown extends PetAction {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user