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());
    }
  }
 public AvatarEffectActivatedWriter(final int spriteId, final int time) {
   super(OperationCodes.getOutgoingOpCode("AvatarEffectActivated"));
   super.push(spriteId);
   super.push(time);
 }
 public TradeAcceptStateWriter(final int playerId, final boolean accept) {
   super(OperationCodes.getOutgoingOpCode("TradeAcceptState"));
   super.push(playerId);
   super.push(accept);
 }
 public RoomDecorationWriter(final Entry<String, String> entry) {
   super(OperationCodes.getOutgoingOpCode("RoomDecoration"));
   super.push(entry.getKey());
   super.push(entry.getValue());
 }
Ejemplo n.º 5
0
 public RoomInfoWriter(
     final RoomInstance instance, final boolean isLoading, final boolean checkEntry) {
   super(OperationCodes.getOutgoingOpCode("RoomInfo"));
   super.push(isLoading);
   super.push(instance.getInformation().getId());
   super.push(0);
   super.push(instance.getInformation().getName());
   super.push(instance.getInformation().getOwnerName());
   super.push(instance.getInformation().getAccessType());
   super.push(instance.getInformation().getTotalPlayers());
   super.push(instance.getInformation().getMaxPlayers());
   super.push(instance.getInformation().getDescription());
   super.push(0);
   super.push(instance.getInformation().isTradingEnabled());
   super.push(0);
   super.push(instance.getInformation().getCategoryId());
   super.push("");
   super.push(instance.getInformation().getRoomTags().length);
   for (final String tag : instance.getInformation().getRoomTags()) {
     super.push(tag);
   }
   super.push(0); // background
   super.push(0); // overlay
   super.push(0); // objects
   super.push(instance.getInformation().petsAreAllowed());
   super.push(true);
   super.push(checkEntry);
   super.push(false); // is staff picked room TODO
 }