Correct amount of max rooms

This commit is contained in:
ArpyAge 2021-10-07 19:08:03 +02:00
parent d327f8cbe6
commit 7b1e94cf17
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ public class RequestCanCreateRoomEvent extends MessageHandler {
@Override
public void handle() throws Exception {
int count = Emulator.getGameEnvironment().getRoomManager().getRoomsForHabbo(this.client.getHabbo()).size();
int max = this.client.getHabbo().getHabboStats().maxRooms;
int max = this.client.getHabbo().getHabboStats().hasActiveClub() ? RoomManager.MAXIMUM_ROOMS_HC : RoomManager.MAXIMUM_ROOMS_USER;
this.client.sendResponse(new CanCreateRoomComposer(count, max));
}
}

View File

@ -48,7 +48,7 @@ public class RequestCreateRoomEvent extends MessageHandler {
return;
int count = Emulator.getGameEnvironment().getRoomManager().getRoomsForHabbo(this.client.getHabbo()).size();
int max = this.client.getHabbo().getHabboStats().maxRooms;
int max = this.client.getHabbo().getHabboStats().hasActiveClub() ? RoomManager.MAXIMUM_ROOMS_HC : RoomManager.MAXIMUM_ROOMS_USER;
if (count >= max) {
this.client.sendResponse(new CanCreateRoomComposer(count, max));