mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-26 08:20:51 +01:00
Merge branch 'fix-teleports' into 'dev'
Fix teleport bugs See merge request morningstar/Arcturus-Community!535
This commit is contained in:
commit
e8192e3f79
@ -4480,6 +4480,10 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
return FurnitureMovementError.MAX_ITEMS;
|
return FurnitureMovementError.MAX_ITEMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tile == null || tile.state == RoomTileState.INVALID) {
|
||||||
|
return FurnitureMovementError.INVALID_MOVE;
|
||||||
|
}
|
||||||
|
|
||||||
rotation %= 8;
|
rotation %= 8;
|
||||||
if (this.hasRights(habbo) || this.getGuildRightLevel(habbo).isEqualOrGreaterThan(RoomRightLevels.GUILD_RIGHTS) || habbo.hasPermission(Permission.ACC_MOVEROTATE)) {
|
if (this.hasRights(habbo) || this.getGuildRightLevel(habbo).isEqualOrGreaterThan(RoomRightLevels.GUILD_RIGHTS) || habbo.hasPermission(Permission.ACC_MOVEROTATE)) {
|
||||||
return FurnitureMovementError.NONE;
|
return FurnitureMovementError.NONE;
|
||||||
|
@ -12,9 +12,6 @@ public class RequestRoomLoadEvent extends MessageHandler {
|
|||||||
String password = this.packet.readString();
|
String password = this.packet.readString();
|
||||||
|
|
||||||
if (this.client.getHabbo().getHabboInfo().getLoadingRoom() == 0 && this.client.getHabbo().getHabboStats().roomEnterTimestamp + 1000 < System.currentTimeMillis()) {
|
if (this.client.getHabbo().getHabboInfo().getLoadingRoom() == 0 && this.client.getHabbo().getHabboStats().roomEnterTimestamp + 1000 < System.currentTimeMillis()) {
|
||||||
if (this.client.getHabbo().getRoomUnit() != null && this.client.getHabbo().getRoomUnit().isTeleporting) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
|
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
|
||||||
if (room != null) {
|
if (room != null) {
|
||||||
@ -24,6 +21,11 @@ public class RequestRoomLoadEvent extends MessageHandler {
|
|||||||
|
|
||||||
this.client.getHabbo().getHabboInfo().setCurrentRoom(null);
|
this.client.getHabbo().getHabboInfo().setCurrentRoom(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.client.getHabbo().getRoomUnit() != null && this.client.getHabbo().getRoomUnit().isTeleporting) {
|
||||||
|
this.client.getHabbo().getRoomUnit().isTeleporting = false;
|
||||||
|
}
|
||||||
|
|
||||||
Emulator.getGameEnvironment().getRoomManager().enterRoom(this.client.getHabbo(), roomId, password);
|
Emulator.getGameEnvironment().getRoomManager().enterRoom(this.client.getHabbo(), roomId, password);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,10 @@ class TeleportActionThree implements Runnable {
|
|||||||
|
|
||||||
RoomTile teleportLocation = targetRoom.getLayout().getTile(targetTeleport.getX(), targetTeleport.getY());
|
RoomTile teleportLocation = targetRoom.getLayout().getTile(targetTeleport.getX(), targetTeleport.getY());
|
||||||
|
|
||||||
|
if (teleportLocation == null) {
|
||||||
|
Emulator.getThreading().run(new TeleportActionFive(this.currentTeleport, this.room, this.client), 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.client.getHabbo().getRoomUnit().setLocation(teleportLocation);
|
this.client.getHabbo().getRoomUnit().setLocation(teleportLocation);
|
||||||
this.client.getHabbo().getRoomUnit().getPath().clear();
|
this.client.getHabbo().getRoomUnit().getPath().clear();
|
||||||
this.client.getHabbo().getRoomUnit().removeStatus(RoomUnitStatus.MOVE);
|
this.client.getHabbo().getRoomUnit().removeStatus(RoomUnitStatus.MOVE);
|
||||||
|
Loading…
Reference in New Issue
Block a user