mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +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 class ActionFollow extends PetAction {
|
||||||
public ActionFollow() {
|
public ActionFollow() {
|
||||||
super(PetTasks.FOLLOW, true);
|
super(PetTasks.FOLLOW, false);
|
||||||
this.statusToRemove.add(RoomUnitStatus.MOVE);
|
|
||||||
this.statusToRemove.add(RoomUnitStatus.LAY);
|
|
||||||
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.clearPosture();
|
|
||||||
|
|
||||||
|
pet.clearPosture();
|
||||||
|
pet.setTask(PetTasks.FOLLOW);
|
||||||
Emulator.getThreading().run(new PetFollowHabbo(pet, habbo, 0));
|
Emulator.getThreading().run(new PetFollowHabbo(pet, habbo, 0));
|
||||||
|
|
||||||
if (pet.getHappyness() > 75)
|
if (pet.getHappyness() > 75)
|
||||||
|
@ -39,7 +39,11 @@ public class PetFollowHabbo implements Runnable {
|
|||||||
this.pet.setTask(PetTasks.FOLLOW);
|
this.pet.setTask(PetTasks.FOLLOW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Emulator.getThreading().run(this, 500);
|
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