public RoomCategoriesWriter(final GapList<RoomCategory> categories) {
    super(OperationCodes.getOutgoingOpCode("RoomCategories"));
    super.push(categories.size());

    for (final RoomCategory category : categories) {
      super.push(category.getId());
      super.push(category.getTitle());
      super.push(!category.isStaffCategory());
    }
  }
  @Override
  public void parse(final Session session, final MessageReader reader) {
    if (!session.isAuthenticated()) {
      return;
    }

    final GapList<CatalogClubOffer> correctedOffers = new GapList<>();

    for (final CatalogClubOffer offer :
        Bootloader.getGame().getCatalogManager().getCatalogClubOffers().values()) {
      if (session.getPlayerInstance().getSubscriptionManager().getBaseLevel()
              > ClubSubscriptionLevel.BASIC
          && offer.getType() == CatalogClubOfferType.BASIC) {
        continue;
      }
      correctedOffers.add(offer);
    }

    session.writeMessage(new CatalogClubOffersWriter(correctedOffers, Bootloader.getTimestamp()));
  }