check rights if room is invisible

this fixes #788
This commit is contained in:
Mikkel Friis 2020-09-19 01:56:00 +02:00
parent 1bd21c490f
commit a0072a407f

View File

@ -527,10 +527,10 @@ public class RoomManager {
if (overrideChecks ||
room.isOwner(habbo) ||
room.getState() == RoomState.OPEN ||
room.getState() == RoomState.INVISIBLE ||
habbo.hasPermission(Permission.ACC_ANYROOMOWNER) ||
habbo.hasPermission(Permission.ACC_ENTERANYROOM) ||
room.hasRights(habbo) ||
(room.getState().equals(RoomState.INVISIBLE) && room.hasRights(habbo)) ||
(room.hasGuild() && room.guildRightLevel(habbo) > 2)) {
this.openRoom(habbo, room, doorLocation);
} else if (room.getState() == RoomState.LOCKED) {
@ -563,6 +563,9 @@ public class RoomManager {
habbo.getClient().sendResponse(new HotelViewComposer());
habbo.getHabboInfo().setLoadingRoom(0);
}
} else {
habbo.getClient().sendResponse(new HotelViewComposer());
habbo.getHabboInfo().setLoadingRoom(0);
}
}