mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +01:00
Added pet swim on water
This commit is contained in:
parent
0363baf523
commit
90dfc45796
@ -48,16 +48,19 @@ public class InteractionWater extends InteractionDefault {
|
|||||||
for (Habbo habbo : room.getHabbosOnItem(this)) {
|
for (Habbo habbo : room.getHabbosOnItem(this)) {
|
||||||
try {
|
try {
|
||||||
this.onWalkOff(habbo.getRoomUnit(), room, empty);
|
this.onWalkOff(habbo.getRoomUnit(), room, empty);
|
||||||
} catch (Exception e) {
|
} catch (Exception ignored) {}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Bot bot : room.getBotsOnItem(this)) {
|
for (Bot bot : room.getBotsOnItem(this)) {
|
||||||
try {
|
try {
|
||||||
this.onWalkOff(bot.getRoomUnit(), room, empty);
|
this.onWalkOff(bot.getRoomUnit(), room, empty);
|
||||||
} catch (Exception e) {
|
} catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (Pet pet : room.getPetsOnItem(this)) {
|
||||||
|
try {
|
||||||
|
this.onWalkOff(pet.getRoomUnit(), room, empty);
|
||||||
|
} catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +81,9 @@ public class InteractionWater extends InteractionDefault {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!pet.getRoomUnit().hasStatus(RoomUnitStatus.SWIM) && pet.getPetData().canSwim) {
|
if (!pet.getRoomUnit().hasStatus(RoomUnitStatus.SWIM) && pet.getPetData().canSwim) {
|
||||||
pet.getRoomUnit().setStatus(RoomUnitStatus.SWIM, "");
|
pet.getRoomUnit().clearStatus();
|
||||||
|
pet.getRoomUnit().setStatus(RoomUnitStatus.SWIM, pet.getRoomUnit().getCurrentLocation().getStackHeight() + "");
|
||||||
|
pet.packetUpdate = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +96,9 @@ public class InteractionWater extends InteractionDefault {
|
|||||||
if(pet == null)
|
if(pet == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
pet.getRoomUnit().clearStatus();
|
||||||
pet.getRoomUnit().removeStatus(RoomUnitStatus.SWIM);
|
pet.getRoomUnit().removeStatus(RoomUnitStatus.SWIM);
|
||||||
|
pet.packetUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user