mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Fix ActionFollow
This commit is contained in:
parent
55015afd46
commit
df0b34a7bd
@ -11,16 +11,14 @@ import com.eu.habbo.threading.runnables.PetFollowHabbo;
|
||||
|
||||
public class ActionFollow extends PetAction {
|
||||
public ActionFollow() {
|
||||
super(PetTasks.FOLLOW, true);
|
||||
this.statusToRemove.add(RoomUnitStatus.MOVE);
|
||||
this.statusToRemove.add(RoomUnitStatus.LAY);
|
||||
this.statusToRemove.add(RoomUnitStatus.DEAD);
|
||||
super(PetTasks.FOLLOW, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Pet pet, Habbo habbo, String[] data) {
|
||||
pet.clearPosture();
|
||||
|
||||
pet.clearPosture();
|
||||
pet.setTask(PetTasks.FOLLOW);
|
||||
Emulator.getThreading().run(new PetFollowHabbo(pet, habbo, 0));
|
||||
|
||||
if (pet.getHappyness() > 75)
|
||||
|
@ -39,7 +39,11 @@ public class PetFollowHabbo implements Runnable {
|
||||
this.pet.setTask(PetTasks.FOLLOW);
|
||||
}
|
||||
}
|
||||
if(target.distance(this.pet.getRoomUnit().getCurrentLocation()) > 1) {
|
||||
Emulator.getThreading().run(this, 500);
|
||||
} else {
|
||||
this.pet.setTask(PetTasks.FREE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user