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.users.Habbo;
|
|
|
|
import com.eu.habbo.threading.runnables.PetFollowHabbo;
|
|
|
|
|
2019-05-26 20:14:53 +02:00
|
|
|
public class ActionFollowRight extends PetAction {
|
|
|
|
public ActionFollowRight() {
|
2018-09-12 18:45:00 +02:00
|
|
|
super(PetTasks.FOLLOW, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
@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
|
|
|
//Follow right.
|
|
|
|
pet.clearPosture();
|
|
|
|
|
2019-05-26 20:14:53 +02:00
|
|
|
Emulator.getThreading().run(new PetFollowHabbo(pet, habbo, +2));
|
2018-09-12 18:45:00 +02:00
|
|
|
|
2019-05-26 20:14:53 +02:00
|
|
|
if (pet.getHappyness() > 75)
|
2018-09-12 18:45:00 +02:00
|
|
|
pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL));
|
|
|
|
else
|
|
|
|
pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL));
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|