2018-09-12 18:45:00 +02:00
|
|
|
package com.eu.habbo.habbohotel.pets.actions;
|
|
|
|
|
2019-05-26 22:46:02 +02:00
|
|
|
import com.eu.habbo.Emulator;
|
2018-09-12 18:45:00 +02:00
|
|
|
import com.eu.habbo.habbohotel.pets.Pet;
|
|
|
|
import com.eu.habbo.habbohotel.pets.PetAction;
|
|
|
|
import com.eu.habbo.habbohotel.pets.PetTasks;
|
|
|
|
import com.eu.habbo.habbohotel.pets.PetVocalsType;
|
|
|
|
import com.eu.habbo.habbohotel.rooms.RoomUnitStatus;
|
|
|
|
import com.eu.habbo.habbohotel.users.Habbo;
|
|
|
|
|
2019-05-26 20:14:53 +02:00
|
|
|
public class ActionStay extends PetAction {
|
|
|
|
public ActionStay() {
|
2018-09-12 18:45:00 +02:00
|
|
|
super(PetTasks.STAY, true);
|
|
|
|
|
|
|
|
this.statusToRemove.remove(RoomUnitStatus.MOVE);
|
|
|
|
this.statusToRemove.remove(RoomUnitStatus.DEAD);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-05-26 20:14:53 +02:00
|
|
|
public boolean apply(Pet pet, Habbo habbo, String[] data) {
|
2018-09-12 18:45:00 +02:00
|
|
|
pet.clearPosture();
|
|
|
|
|
|
|
|
pet.getRoomUnit().setCanWalk(false);
|
2019-05-26 22:46:02 +02:00
|
|
|
pet.setStayStartedAt(Emulator.getIntUnixTimestamp());
|
2018-09-12 18:45:00 +02:00
|
|
|
pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL));
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|