예제 #1
0
        public static void Compose(IMessageComposer messageComposer, PublicItemData publicItem)
        {
            messageComposer.Data.Add(publicItem.BannerId);
            messageComposer.Data.Add(publicItem.BannerType != BannerType.PUBLIC_FLAT ? publicItem.Label : string.Empty);
            messageComposer.Data.Add(publicItem.Description);
            messageComposer.Data.Add((int)publicItem.ImageType);
            messageComposer.Data.Add(publicItem.BannerType != BannerType.PUBLIC_FLAT ? publicItem.Label : string.Empty);
            messageComposer.Data.Add(publicItem.Image);
            messageComposer.Data.Add(publicItem.ParentId);
            messageComposer.Data.Add(publicItem.Room != null ? publicItem.Room.UsersNow : 0);
            messageComposer.Data.Add((int)publicItem.BannerType);

            if (publicItem.BannerType == BannerType.TAG)
            {
                messageComposer.Data.Add(string.Empty); // Tag to search
            }
            if (publicItem.BannerType == BannerType.CATEGORY)
            {
                messageComposer.Data.Add(true); // is open
            }
            if (publicItem.BannerType == BannerType.FLAT)
            {
                FlatListComposer.Compose(messageComposer, publicItem.Room);
            }

            if (publicItem.BannerType == BannerType.PUBLIC_FLAT)
            {
                /*
                 * public function _SafeStr_3944(k:_SafeStr_2170)
                 * {
                 *  this._SafeStr_10591 = k.readString();
                 *  this._SafeStr_10175 = k.readInt();
                 *  this._SafeStr_10592 = k.readInt();
                 *  this._SafeStr_10174 = k.readString();
                 *  this._SafeStr_10658 = k.readInt();
                 *  this._SafeStr_10173 = k.readInt();
                 * }
                 */
                messageComposer.Data.Add(publicItem.Description);
                messageComposer.Data.Add(0);
                messageComposer.Data.Add(publicItem.DescriptionEntry);
                messageComposer.Data.Add(publicItem.Room.CCTs);
                messageComposer.Data.Add(publicItem.Room.UsersMax);
                messageComposer.Data.Add(publicItem.Room.Id);
            }
        }
예제 #2
0
 public FlatListComposer(int signifier, List <Room> roomList, PublicItemData promotion)
 {
     this.signifier = signifier;
     this.roomList  = roomList;
     this.promotion = promotion;
 }