Пример #1
0
        public NavigatorSearchResultSetComposer(string category, string data, ICollection <SearchResultList> searchResultLists, GameClient session, int goBack = 1,
                                                int fetchLimit = 12)
            : base(ServerPacketHeader.NavigatorSearchResultSetMessageComposer)
        {
            WriteString(category);                 //Search code.
            WriteString(data);                     //Text?

            WriteInteger(searchResultLists.Count); //Count
            foreach (var searchResult in searchResultLists.ToList())
            {
                WriteString(searchResult.CategoryIdentifier);
                WriteString(searchResult.PublicName);
                WriteInteger(NavigatorSearchAllowanceUtility.GetIntegerValue(searchResult.SearchAllowance) != 0
                    ? goBack
                    : NavigatorSearchAllowanceUtility.GetIntegerValue(searchResult.SearchAllowance)); //0 = nothing, 1 = show more, 2 = back Action allowed.
                WriteBoolean(false);                                                                  //True = minimized, false = open.
                WriteInteger(searchResult.ViewMode == NavigatorViewMode.REGULAR
                    ? 0
                    : searchResult.ViewMode == NavigatorViewMode.THUMBNAIL
                        ? 1
                        : 0); //View mode, 0 = tiny/regular, 1 = thumbnail

                NavigatorHandler.Search(this, searchResult, data, session, fetchLimit);
            }
        }
Пример #2
0
 public SearchResultList(int Id, string Category, string CategoryIdentifier, string PublicName, bool CanDoActions, int Colour, int RequiredRank, NavigatorViewMode ViewMode, string CategoryType, string SearchAllowance, int OrderId)
 {
     this.Id                 = Id;
     this.Category           = Category;
     this.CategoryIdentifier = CategoryIdentifier;
     this.PublicName         = PublicName;
     this.CanDoActions       = CanDoActions;
     this.Colour             = Colour;
     this.RequiredRank       = RequiredRank;
     this.ViewMode           = ViewMode;
     this.CategoryType       = NavigatorCategoryTypeUtility.GetCategoryTypeByString(CategoryType);
     this.SearchAllowance    = NavigatorSearchAllowanceUtility.GetSearchAllowanceByString(SearchAllowance);
     this.OrderId            = OrderId;
 }
Пример #3
0
 public SearchResultList(int Id, string Category, string CategoryIdentifier, string PublicName, bool CanDoActions, int Colour, int RequiredRank, NavigatorViewMode ViewMode, string CategoryType, string SearchAllowance, int OrderId)
 {
     _id              = Id;
     _category        = Category;
     _categoryName    = CategoryIdentifier;
     _customName      = PublicName;
     _canDoActions    = CanDoActions;
     _colour          = Colour;
     _requiredRank    = RequiredRank;
     _viewMode        = ViewMode;
     _categoryType    = NavigatorCategoryTypeUtility.GetCategoryTypeByString(CategoryType);
     _searchAllowance = NavigatorSearchAllowanceUtility.GetSearchAllowanceByString(SearchAllowance);
     _orderId         = OrderId;
 }
        public NavigatorSearchResultSetComposer(string Category, string Data, ICollection <SearchResultList> SearchResultLists, GameClient Session, int GoBack = 1, int FetchLimit = 12)
            : base(ServerPacketHeader.NavigatorSearchResultSetMessageComposer)
        {
            base.WriteString(Category);                 //Search code.
            base.WriteString(Data);                     //Text?

            base.WriteInteger(SearchResultLists.Count); //Count
            foreach (SearchResultList SearchResult in SearchResultLists.ToList())
            {
                base.WriteString(SearchResult.CategoryIdentifier);
                base.WriteString(SearchResult.PublicName);
                base.WriteInteger(NavigatorSearchAllowanceUtility.GetIntegerValue(SearchResult.SearchAllowance) != 0 ? GoBack : NavigatorSearchAllowanceUtility.GetIntegerValue(SearchResult.SearchAllowance)); //0 = nothing, 1 = show more, 2 = back Action allowed.
                base.WriteBoolean(false);                                                                                                                                                                       //True = minimized, false = open.
                base.WriteInteger(SearchResult.ViewMode == NavigatorViewMode.Regular ? 0 : SearchResult.ViewMode == NavigatorViewMode.Thumbnail ? 1 : 0);                                                       //View mode, 0 = tiny/regular, 1 = thumbnail

                NavigatorHandler.Search(this, SearchResult, Data, Session, FetchLimit);
            }
        }
Пример #5
0
        public override void Compose(ServerPacket packet)
        {
            packet.WriteString(Category);                 //Search code.
            packet.WriteString(Data);                     //Text?

            packet.WriteInteger(SearchResultLists.Count); //Count
            foreach (SearchResultList searchResult in SearchResultLists.ToList())
            {
                packet.WriteString(searchResult.CategoryIdentifier);
                packet.WriteString(searchResult.PublicName);
                packet.WriteInteger(NavigatorSearchAllowanceUtility.GetIntegerValue(searchResult.SearchAllowance) != 0
                    ? GoBack
                    : NavigatorSearchAllowanceUtility.GetIntegerValue(searchResult
                                                                      .SearchAllowance)); //0 = nothing, 1 = show more, 2 = back Action allowed.
                packet.WriteBoolean(false);                                               //True = minimized, false = open.
                packet.WriteInteger(searchResult.ViewMode == NavigatorViewMode.Regular ? 0 :
                                    searchResult.ViewMode == NavigatorViewMode.Thumbnail ? 1 :
                                    0); //View mode, 0 = tiny/regular, 1 = thumbnail

                NavigatorHandler.Search(packet, searchResult, Data, Habbo, FetchLimit);
            }
        }