Can you show us your CatalogIndexComposer and dump/screenshot a couple rows from catalog_pages?
Cheers.
Also, could you paste in your external_variables & override variables.
using System.Collections.Generic;
using Plus.HabboHotel.Catalog;
using Plus.HabboHotel.GameClients;
namespace Plus.Communication.Packets.Outgoing.Catalog
{
public class CatalogIndexComposer : ServerPacket
{
public CatalogIndexComposer(GameClient Session, ICollection<CatalogPage> Pages, int Sub = 0)
: base(ServerPacketHeader.CatalogIndexMessageComposer)
{
WriteRootIndex(Session, Pages);
foreach (CatalogPage Page in Pages)
{
if (Page.ParentId != -1 || Page.MinimumRank > Session.GetHabbo().Rank || (Page.MinimumVIP > Session.GetHabbo().VIPRank && Session.GetHabbo().Rank == 1))
continue;
WritePage(Page, CalcTreeSize(Session, Pages, Page.Id));
foreach (CatalogPage child in Pages)
{
if (child.ParentId != Page.Id || Page.MinimumRank > Session.GetHabbo().Rank || (Page.MinimumVIP > Session.GetHabbo().VIPRank && Session.GetHabbo().Rank == 1))
continue;
WritePage(child, CalcTreeSize(Session, Pages, child.Id));
foreach (CatalogPage baby in Pages)
{
if (baby.ParentId != child.Id || Page.MinimumRank > Session.GetHabbo().Rank || (Page.MinimumVIP > Session.GetHabbo().VIPRank && Session.GetHabbo().Rank == 1))
continue;
WritePage(baby, 0);
}
}
}
base.WriteBoolean(false);
base.WriteString("NORMAL");
}
public void WriteRootIndex(GameClient Session, ICollection<CatalogPage> Pages)
{
base.WriteBoolean(true);
base.WriteInteger(0);
base.WriteInteger(-1);
base.WriteString("root");
base.WriteString(string.Empty);
base.WriteInteger(0);
base.WriteInteger(CalcTreeSize(Session, Pages, -1));
}
public void WritePage(CatalogPage Page, int TreeSize)
{
base.WriteBoolean(Page.Visible);
base.WriteInteger(Page.Icon);
base.WriteInteger(Page.Id);
base.WriteString(Page.PageLink);
base.WriteString(Page.Caption);
base.WriteInteger(Page.ItemOffers.Count);
foreach (int i in Page.ItemOffers.Keys)
{
base.WriteInteger(i);
}
base.WriteInteger(TreeSize);
}
public int CalcTreeSize(GameClient Session, ICollection<CatalogPage> Pages, int ParentId)
{
int i = 0;
foreach (CatalogPage Page in Pages)
{
if (Page.MinimumRank > Session.GetHabbo().Rank || (Page.MinimumVIP > Session.GetHabbo().VIPRank && Session.GetHabbo().Rank == 1) || Page.ParentId != ParentId)
continue;
if (Page.ParentId == ParentId)
i++;
}
return i;
}
}
}
seasonalcurrencyindicator.currency=103
seasonalcurrencyindicator.enabled=true
seasonalcurrencyindicator.page=diamonds
ads.domain=
roomenterad.habblet.enabled=false
diamonds.enabled=true
camera.enabled=false
builders.club.enabled=false
toolbar.stories.enabled=true
supersaverads.video.promo.development.mode=false
supersaverads.video.promo.enabled=false
offers.enabled=false
offers.sponsorpay.appid=0
offers.supersonic.enabled=false
avatareditor.promohabbos=http://localhost/game/gamedata/habblet/xml/promo_habbos.xml
game.center.default_game=basejump
game.center.enabled=true
game.center.promoted_game=basejump
embed.showInRoomInfo=true
sms.identity.verification.button.enabled=false
sms.identity.verification.enabled=false
multi.item.trading.enabled=true
disabled.custom.chat.styles=1,2,8,18,23,28,30,31,32,33,34,35
flash.dynamic.download.name.template=%typeid%.swf
flash.dynamic.download.url=http://localhost/game/dcr/hof_furni/
flash.dynamic.avatar.download.configuration=http://localhost/game/gamedata/figuremap.xml
group.badge.url=http://localhost/game/habbo-imaging/badge/%imagerdata%.gif
habbopages.url=http://localhost/game/gamedata/habbopages/
flash.client.url=http://localhost/game/gordon/PRODUCTION-201512170847-152005991/
external.texts.txt=http://localhost/game/gamedata/external_flash_texts/b7eb1d2844054a29476048a94e72a842be2d7822
external.override.texts.txt=http://localhost/game/gamedata/override/external_flash_override_texts/ccc12168e0117bbe34725223b194b0258beb10b2
external.override.variables.txt=http://localhost/game/gamedata/override/external_override_variables/da39a3ee5e6b4b0d3255bfef95601890afd80709
productdata.load.url=http://localhost/game/gamedata/productdata/29b96ba4eb25409c91c0ab725608a1add02e27fd
furnidata.load.url=http://localhost/game/gamedata/furnidata_xml/1af7ee31d9bfd314459f765ed457d7150e9724d1
http://pastebin.com/raw/4n3Z8CiY
Yeah it makes sense, they are negative values (as here is my actual CatalogIndexComposer)From what I've seen, root/parent categories (tabs at the top) need to be -1 for their parent category & have a page relation/link set.
Sub/child categories need to have a negative parent ID to be clickable (at-least for me), unless there is something missing haven't been able to work it out fully.
Ancestor (proceeding from child) categories can be a positive ID. Hope that makes sense, again this might be different for you - not sure.
using System.Collections.Generic;
using Plus.HabboHotel.Catalog;
using Plus.HabboHotel.GameClients;
using Plus.HabboHotel.Users;
namespace Plus.Communication.Packets.Outgoing.Catalog
{
public class CatalogIndexComposer : ServerPacket
{
public CatalogIndexComposer(GameClient Session, string Mode)
: base(ServerPacketHeader.CatalogIndexMessageComposer)
{
NodeData(new CatalogPage(Mode == "NORMAL" ? -1 : -2), Session.GetHabbo());
base.WriteBoolean(false); //show new items?
base.WriteString(Mode);
}
public void NodeData(CatalogPage Page, Habbo Habbo)
{
base.WriteBoolean(Page.Visible);
base.WriteInteger(Page.Icon);
base.WriteInteger(Page.Enabled ? -1 : Page.Id);
base.WriteString(Page.PageLink);
base.WriteString(Page.Caption);
base.WriteInteger(Page.ItemOffers.Count);
foreach (int i in Page.ItemOffers.Keys)
{
base.WriteInteger(i);
}
List<CatalogPage> Subs = PlusEnvironment.GetGame().GetCatalog().getPagesForHabbo(Page.Id, Habbo);
base.WriteInteger(Subs.Count);
foreach(CatalogPage Sub in Subs)
{
NodeData(Sub, Habbo);
}
}
}
}
base.WriteInteger(Page.Enabled ? -1 : Page.Id);
Yeah just figured that out when I tested it xD that source was just wrote then as replaced file with one from your emu before and had to do it again! That was a silly mistake on my part but issue is still present. You have a really good eye for things nglPHP:base.WriteInteger(Page.Enabled ? -1 : Page.Id);
I think this is your issue, it needs to match up with the ID. From what I can tell (I think) if the page is enabled it'll just show as -1 for each page? Rather than the ID it should show.
Hope that makes sense, not infront of a source atm.
base.WriteBoolean(true);
base.WriteInteger(0);
base.WriteInteger(-1);
base.WriteString("root");
base.WriteString(string.Empty);
base.WriteInteger(0);
base.WriteInteger(CalcTreeSize(Session, Pages, -1));
Another thing (not sure if you are actually doing this already just hidden) I'm not sure if you're writing the root?
E.g. just a blank entry that loads first before all pages.
PHP:base.WriteBoolean(true); base.WriteInteger(0); base.WriteInteger(-1); base.WriteString("root"); base.WriteString(string.Empty); base.WriteInteger(0); base.WriteInteger(CalcTreeSize(Session, Pages, -1));
Yeah the root is correct, I just modified the CatalogPage class
You must be registered for see links- my catalog_pages
Ooh, I see. Have you tried debugging and adding some breakpoints to see if those results do show?
When I get home, if you're still having this issue I'll test with your pages.
Yeah it's all correct in terms of the way the emulator reads the catalog tree it just doesn't parse correctly.
If you put the "Clothing", "Pets" and "Memberships" categories in the "Furniture" sub category then they work fine;
You must be registered for see links
It really has baffled me xD
Oh damn I am dumb!
I have fixed it ty sledmore <3
It was the page link, like you said!Good to hear, what was the issue?
It was the page link, like you said!
I didn't see your message though ;P - only found after reading through.
It's weird though as Habbo doesn't use any page links? But thanks xD!
Oh and would you happen to know how to enable gamecenter?
As from what I can see it's still in the Habbo.swf but changing external variables doesn't seem to work.
Habbo do, on all pages (I believe), especially the top tabs though. It's for the hyperlinks in the catalog and hotel view buttons too. If you have a packet structure I can point out which bit it is (but most of your pages seem to have a pagelink, other than 1-13).
I'll have to check when I get home for that, I'll PM you. If I remember rightly... two files one is something about the bottombar and the other I can't 100% remember, but you change a boolean to true & ctrl + f for elisa_habbo_stories (or something like that) and change it to 'basejump'.
Again, once I'm home I can get you my notes I wrote a while ago.