Arcturus-Community/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionCroak.java

30 lines
966 B
Java
Raw Normal View History

2018-09-12 18:45:00 +02:00
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.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;
import com.eu.habbo.threading.runnables.PetClearPosture;
2019-05-26 20:14:53 +02:00
public class ActionCroak extends PetAction {
public ActionCroak() {
2018-09-12 18:45:00 +02:00
super(PetTasks.SPEAK, false);
this.minimumActionDuration = 2000;
}
@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.getRoomUnit().setStatus(RoomUnitStatus.CROAK, "0");
Emulator.getThreading().run(new PetClearPosture(pet, RoomUnitStatus.CROAK, null, false), 2000);
2019-05-26 20:14:53 +02:00
if (pet.getHappyness() > 80)
2018-09-12 18:45:00 +02:00
pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL));
return true;
}
}