예제 #1
0
        private static void ProcessRequestCategoryListings(Habbo sender, IncomingMessage message)
        {
            bool excludeFullRooms = message.PopWiredBoolean();
            int categoryID = message.PopWiredInt32();

            Category category = CoreManager.ServerCore.GetNavigator().GetCategory(categoryID);

            if (category == null)
                new MNavigatorCategoryListing // TODO: Remove this. Maybe even throw an exception?
                    {
                        ID = categoryID,
                        ExcludeFullRooms = excludeFullRooms,
                        Name = "Non-Existant Category",
                        ParentID = categoryID,
                        IsPublicCategory = true,
                        Listings = new Listing[0],
                        UnknownA = 0,
                        UnknownB = 10000,
                        UnknownC = 0
                    }.Send(sender);
            else
                new MNavigatorCategoryListing
                {
                    ID = categoryID,
                    ExcludeFullRooms = excludeFullRooms,
                    Name = category.Name,
                    ParentID = (category.PrimaryCategory != null ? category.PrimaryCategory.ID : category.ID),
                    IsPublicCategory = category.IsPublicCategory,
                    Listings = category.GetListings(),

                    UnknownA = 0,
                    UnknownB = 10000,
                    UnknownC = 0
                }.Send(sender);
        }
예제 #2
0
        private static void ProcessRequestCategoryListings(Habbo sender, IncomingMessage message)
        {
            bool excludeFullRooms = message.PopWiredBoolean();
            int  categoryID       = message.PopWiredInt32();

            Category category = CoreManager.ServerCore.GetNavigator().GetCategory(categoryID);

            if (category == null)
            {
                new MNavigatorCategoryListing // TODO: Remove this. Maybe even throw an exception?
                {
                    ID = categoryID,
                    ExcludeFullRooms = excludeFullRooms,
                    Name             = "Non-Existant Category",
                    ParentID         = categoryID,
                    IsPublicCategory = true,
                    Listings         = new Listing[0],
                    UnknownA         = 0,
                    UnknownB         = 10000,
                    UnknownC         = 0
                }
            }