示例#1
0
    public static HCatalogNode Parse(IHFormat format, ref ReadOnlySpan <byte> packetSpan)
    {
        var    root = new HCatalogNode(format, ref packetSpan);
        bool   newAdditionsAvailable = format.Read <bool>(ref packetSpan);
        string catalogType           = format.ReadUTF8(ref packetSpan);

        return(root);
    }
示例#2
0
    public HCatalogNode(IHFormat format, ref ReadOnlySpan <byte> packetSpan)
    {
        Visible = format.Read <bool>(ref packetSpan);

        Icon         = format.Read <int>(ref packetSpan);
        PageId       = format.Read <int>(ref packetSpan);
        PageName     = format.ReadUTF8(ref packetSpan);
        Localization = format.ReadUTF8(ref packetSpan);

        OfferIds = new int[format.Read <int>(ref packetSpan)];
        for (int i = 0; i < OfferIds.Length; i++)
        {
            OfferIds[i] = format.Read <int>(ref packetSpan);
        }

        Children = new HCatalogNode[format.Read <int>(ref packetSpan)];
        for (int i = 0; i < Children.Length; i++)
        {
            Children[i] = new HCatalogNode(format, ref packetSpan);
        }
    }