You just set the icon for the page? It's under catalog_pages database table.
The icons are found in your swf folder under c_images/catalogue
You just set the icon for the page? It's under catalog_pages database table.
The icons are found in your swf folder under c_images/catalogue
I've took the time to clean up one of the worst written composers in Plus, which causes alot of problems for people adding sub pages to categories in the catalog, or sub pages of sub pages. This "fix" or clean up code allows you to add as many sub pages as you like, as well as not foreaching the catalog pages multiple times (for counts ext.). But enough of that, let's get cleaning .
Firstly in CatalogManager.cs find this code:
Code:public ICollection<CatalogPage> GetPages() { return _pages.Values; }
Changing it to this:
Code:public ICollection<CatalogPage> GetPages(GameClient session, int pageId) { List<CatalogPage> pages = new List<CatalogPage>(); foreach (CatalogPage page in this._pages.Values) { if (page.ParentId != pageId || page.MinimumRank > session.GetHabbo().Rank || (page.MinimumVIP > session.GetHabbo().VIPRank && session.GetHabbo().Rank == 1)) { continue; } pages.Add(page); } return pages; }
Secondly in GetCatalogIndexEvent.cs find this code:
Code:session.SendPacket(new CatalogIndexComposer(session, PlusEnvironment.GetGame().GetCatalog().GetPages()));
Changing it to this:
Code:session.SendPacket(new CatalogIndexComposer(session, PlusEnvironment.GetGame().GetCatalog().GetPages(session, -1)));
And lastly in CatalogIndexComposer.cs replace the entire class with this:
Code:public class CatalogIndexComposer : ServerPacket { public CatalogIndexComposer(GameClient session, ICollection<CatalogPage> pages) : base(ServerPacketHeader.CatalogIndexMessageComposer) { base.WriteBoolean(true); base.WriteInteger(0); base.WriteInteger(-1); base.WriteString("root"); base.WriteString(""); base.WriteInteger(0); base.WriteInteger(pages.Count); foreach (CatalogPage page in pages) { Append(session, page); } base.WriteBoolean(false); base.WriteString("NORMAL"); } public void Append(GameClient session, CatalogPage page) { ICollection<CatalogPage> pages = PlusEnvironment.GetGame().GetCatalog().GetPages(session, page.Id); base.WriteBoolean(page.Visible); base.WriteInteger(page.Icon); base.WriteInteger(page.Enabled ? page.Id : -1); base.WriteString(page.PageLink); base.WriteString(page.Caption); base.WriteInteger(page.ItemOffers.Count); foreach (int key in page.ItemOffers.Keys) { base.WriteInteger(key); } base.WriteInteger(pages.Count); foreach (CatalogPage nextPage in pages) { Append(session, nextPage); } } }
Now we're all done, enjoy, love you all, peace, dab emoji.
@Muff for helping test.
@Dolan for requesting this in the first place.
@JynX cause he's just sexy.