コード例 #1
0
ファイル: Catalog.cs プロジェクト: habb0/Bfly
        internal static ServerMessage SerializePage(CatalogPage Page)
        {
            ServerMessage PageData = new ServerMessage(127);
            PageData.AppendInt32(Page.PageId);

            switch (Page.Layout)
            {
                case "frontpage":

                    PageData.AppendStringWithBreak("frontpage3");
                    PageData.AppendInt32(3);
                    PageData.AppendStringWithBreak(Page.LayoutHeadline);
                    PageData.AppendStringWithBreak(Page.LayoutTeaser);
                    PageData.AppendStringWithBreak("");
                    PageData.AppendInt32(11);
                    PageData.AppendStringWithBreak(Page.Text1);
                    PageData.AppendStringWithBreak("");
                    PageData.AppendStringWithBreak(Page.Text2);
                    PageData.AppendStringWithBreak(Page.TextDetails);
                    PageData.AppendStringWithBreak("");
                    PageData.AppendStringWithBreak("#FAF8CC");
                    PageData.AppendStringWithBreak("#FAF8CC");
                    PageData.AppendStringWithBreak(LanguageLocale.GetValue("catalog.waystogetcredits"));
                    PageData.AppendStringWithBreak("magic.credits");

                    break;

                case "recycler_info":

                    PageData.AppendStringWithBreak(Page.Layout);
                    PageData.AppendInt32(2);
                    PageData.AppendStringWithBreak(Page.LayoutHeadline);
                    PageData.AppendStringWithBreak(Page.LayoutTeaser);
                    PageData.AppendInt32(3);
                    PageData.AppendStringWithBreak(Page.Text1);
                    PageData.AppendStringWithBreak(Page.Text2);
                    PageData.AppendStringWithBreak(Page.TextDetails);

                    break;

                case "recycler_prizes":

                    // Ac@aArecycler_prizesIcatalog_recycler_headline3IDe Ecotron geeft altijd een van deze beloningen:H
                    PageData.AppendStringWithBreak("recycler_prizes");
                    PageData.AppendInt32(1);
                    PageData.AppendStringWithBreak("catalog_recycler_headline3");
                    PageData.AppendInt32(1);
                    PageData.AppendStringWithBreak(Page.Text1);

                    break;

                case "spaces_new":

                    PageData.AppendStringWithBreak(Page.Layout);
                    PageData.AppendInt32(1);
                    PageData.AppendStringWithBreak(Page.LayoutHeadline);
                    PageData.AppendInt32(1);
                    PageData.AppendStringWithBreak(Page.Text1);

                    break;

                case "recycler":

                    PageData.AppendStringWithBreak(Page.Layout);
                    PageData.AppendInt32(2);
                    PageData.AppendStringWithBreak(Page.LayoutHeadline);
                    PageData.AppendStringWithBreak(Page.LayoutTeaser);
                    PageData.AppendInt32(1);
                    PageData.AppendStringWithBreak(Page.Text1, 10);
                    PageData.AppendStringWithBreak(Page.Text2);
                    PageData.AppendStringWithBreak(Page.TextDetails);

                    break;

                case "trophies":

                    PageData.AppendStringWithBreak("trophies");
                    PageData.AppendInt32(1);
                    PageData.AppendStringWithBreak(Page.LayoutHeadline);
                    PageData.AppendInt32(2);
                    PageData.AppendStringWithBreak(Page.Text1);
                    PageData.AppendStringWithBreak(Page.TextDetails);

                    break;

                case "pets":

                    PageData.AppendStringWithBreak("pets");
                    PageData.AppendInt32(2);
                    PageData.AppendStringWithBreak(Page.LayoutHeadline);
                    PageData.AppendStringWithBreak(Page.LayoutTeaser);
                    PageData.AppendInt32(4);
                    PageData.AppendStringWithBreak(Page.Text1);
                    PageData.AppendStringWithBreak(LanguageLocale.GetValue("catalog.pickname"));
                    PageData.AppendStringWithBreak(LanguageLocale.GetValue("catalog.pickcolor"));
                    PageData.AppendStringWithBreak(LanguageLocale.GetValue("catalog.pickrace"));

                    break;

                case "soundmachine":

                    PageData.AppendStringWithBreak(Page.Layout);
                    PageData.AppendInt32(2);
                    PageData.AppendStringWithBreak(Page.LayoutHeadline);
                    PageData.AppendStringWithBreak(Page.LayoutTeaser);
                    PageData.AppendInt32(2);
                    PageData.AppendStringWithBreak(Page.Text1);
                    PageData.AppendStringWithBreak(Page.TextDetails);
                    break;

                default:

                    PageData.AppendStringWithBreak(Page.Layout);
                    PageData.AppendInt32(3);
                    PageData.AppendStringWithBreak(Page.LayoutHeadline);
                    PageData.AppendStringWithBreak(Page.LayoutTeaser);
                    PageData.AppendStringWithBreak(Page.LayoutSpecial);
                    PageData.AppendInt32(3);
                    PageData.AppendStringWithBreak(Page.Text1);
                    PageData.AppendStringWithBreak(Page.TextDetails);
                    PageData.AppendStringWithBreak(Page.TextTeaser);

                    break;
            }

            PageData.AppendInt32(Page.Items.Count);

            foreach (CatalogItem Item in Page.Items.Values)
            {
                Item.Serialize(PageData);
            }

            PageData.AppendInt32(-1);

            return PageData;
        }
コード例 #2
0
ファイル: Catalog.cs プロジェクト: nightwolf93/Bfly
        internal static ServerMessage SerializePage(CatalogPage Page)
        {
            ServerMessage PageData = new ServerMessage(127);

            PageData.AppendInt32(Page.PageId);

            switch (Page.Layout)
            {
            case "frontpage":

                PageData.AppendStringWithBreak("frontpage3");
                PageData.AppendInt32(3);
                PageData.AppendStringWithBreak(Page.LayoutHeadline);
                PageData.AppendStringWithBreak(Page.LayoutTeaser);
                PageData.AppendStringWithBreak("");
                PageData.AppendInt32(11);
                PageData.AppendStringWithBreak(Page.Text1);
                PageData.AppendStringWithBreak("");
                PageData.AppendStringWithBreak(Page.Text2);
                PageData.AppendStringWithBreak(Page.TextDetails);
                PageData.AppendStringWithBreak("");
                PageData.AppendStringWithBreak("#FAF8CC");
                PageData.AppendStringWithBreak("#FAF8CC");
                PageData.AppendStringWithBreak(LanguageLocale.GetValue("catalog.waystogetcredits"));
                PageData.AppendStringWithBreak("magic.credits");

                break;

            case "recycler_info":

                PageData.AppendStringWithBreak(Page.Layout);
                PageData.AppendInt32(2);
                PageData.AppendStringWithBreak(Page.LayoutHeadline);
                PageData.AppendStringWithBreak(Page.LayoutTeaser);
                PageData.AppendInt32(3);
                PageData.AppendStringWithBreak(Page.Text1);
                PageData.AppendStringWithBreak(Page.Text2);
                PageData.AppendStringWithBreak(Page.TextDetails);

                break;

            case "recycler_prizes":

                // Ac@aArecycler_prizesIcatalog_recycler_headline3IDe Ecotron geeft altijd een van deze beloningen:H
                PageData.AppendStringWithBreak("recycler_prizes");
                PageData.AppendInt32(1);
                PageData.AppendStringWithBreak("catalog_recycler_headline3");
                PageData.AppendInt32(1);
                PageData.AppendStringWithBreak(Page.Text1);

                break;

            case "spaces_new":

                PageData.AppendStringWithBreak(Page.Layout);
                PageData.AppendInt32(1);
                PageData.AppendStringWithBreak(Page.LayoutHeadline);
                PageData.AppendInt32(1);
                PageData.AppendStringWithBreak(Page.Text1);

                break;

            case "recycler":

                PageData.AppendStringWithBreak(Page.Layout);
                PageData.AppendInt32(2);
                PageData.AppendStringWithBreak(Page.LayoutHeadline);
                PageData.AppendStringWithBreak(Page.LayoutTeaser);
                PageData.AppendInt32(1);
                PageData.AppendStringWithBreak(Page.Text1, 10);
                PageData.AppendStringWithBreak(Page.Text2);
                PageData.AppendStringWithBreak(Page.TextDetails);

                break;

            case "trophies":

                PageData.AppendStringWithBreak("trophies");
                PageData.AppendInt32(1);
                PageData.AppendStringWithBreak(Page.LayoutHeadline);
                PageData.AppendInt32(2);
                PageData.AppendStringWithBreak(Page.Text1);
                PageData.AppendStringWithBreak(Page.TextDetails);

                break;

            case "pets":

                PageData.AppendStringWithBreak("pets");
                PageData.AppendInt32(2);
                PageData.AppendStringWithBreak(Page.LayoutHeadline);
                PageData.AppendStringWithBreak(Page.LayoutTeaser);
                PageData.AppendInt32(4);
                PageData.AppendStringWithBreak(Page.Text1);
                PageData.AppendStringWithBreak(LanguageLocale.GetValue("catalog.pickname"));
                PageData.AppendStringWithBreak(LanguageLocale.GetValue("catalog.pickcolor"));
                PageData.AppendStringWithBreak(LanguageLocale.GetValue("catalog.pickrace"));

                break;

            case "soundmachine":

                PageData.AppendStringWithBreak(Page.Layout);
                PageData.AppendInt32(2);
                PageData.AppendStringWithBreak(Page.LayoutHeadline);
                PageData.AppendStringWithBreak(Page.LayoutTeaser);
                PageData.AppendInt32(2);
                PageData.AppendStringWithBreak(Page.Text1);
                PageData.AppendStringWithBreak(Page.TextDetails);
                break;


            default:

                PageData.AppendStringWithBreak(Page.Layout);
                PageData.AppendInt32(3);
                PageData.AppendStringWithBreak(Page.LayoutHeadline);
                PageData.AppendStringWithBreak(Page.LayoutTeaser);
                PageData.AppendStringWithBreak(Page.LayoutSpecial);
                PageData.AppendInt32(3);
                PageData.AppendStringWithBreak(Page.Text1);
                PageData.AppendStringWithBreak(Page.TextDetails);
                PageData.AppendStringWithBreak(Page.TextTeaser);

                break;
            }

            PageData.AppendInt32(Page.Items.Count);

            foreach (CatalogItem Item in Page.Items.Values)
            {
                Item.Serialize(PageData);
            }

            PageData.AppendInt32(-1);

            return(PageData);
        }
コード例 #3
0
ファイル: Catalog.cs プロジェクト: BjkGkh/R106
        internal static ServerMessage SerializePage(CatalogPage Page)
        {
            ServerMessage PageData = PacketHandelingManager.GetRecycledItem(OutputCode.CatalogPageMessageEvent, true);
            PageData.AddInt32(Page.PageId);
            PageData.AddString("NORMAL");
            switch (Page.Layout)
            {
                case "frontpage4":
                    PageData.AddString(Page.Layout);
                    PageData.AddInt32(2);
                    PageData.AddString(Page.LayoutHeadline);
                    PageData.AddString(Page.LayoutTeaser);
                    PageData.AddInt32(2);
                    PageData.AddString(Page.Text1, true);
                    PageData.AddString(Page.TextDetails);
                    break;

                case "guild_frontpage":
                    PageData.AddString(Page.Layout);
                    PageData.AddInt32(2);
                    PageData.AddString(Page.LayoutHeadline);
                    PageData.AddString(Page.LayoutTeaser);
                    PageData.AddInt32(3);
                    PageData.AddString(Page.Text1);
                    PageData.AddString(Page.TextDetails.Replace("[13]", Convert.ToChar(13).ToString()).Replace("[10]", Convert.ToChar(10).ToString()));
                    PageData.AddString(Page.TextTeaser);
                    break;

                case "guild_custom_furni":
                    PageData.AddString(Page.Layout);
                    PageData.AddInt32(3);
                    PageData.AddString(Page.LayoutHeadline);
                    PageData.AddString(Page.LayoutTeaser);
                    PageData.AddString(Page.LayoutSpecial);
                    PageData.AddInt32(3);
                    PageData.AddString(Page.Text1);
                    PageData.AddString(Page.TextDetails);
                    PageData.AddString(Page.TextTeaser);
                    break;

                    case "recycler_prizes":

                    PageData.AddString("recycler_prizes");
                    PageData.AddInt32(1);
                    PageData.AddString("catalog_recycler_headline3");
                    PageData.AddInt32(1);
                    PageData.AddString(Page.Text1);

                    break;

                case "spaces_new":

                    PageData.AddString(Page.Layout);
                    PageData.AddInt32(1);
                    PageData.AddString(Page.LayoutHeadline);
                    PageData.AddInt32(1);
                    PageData.AddString(Page.Text1);

                    break;

                case "trophies":
                    PageData.AddString(Page.Layout);
                    PageData.AddInt32(1);
                    PageData.AddString(Page.LayoutHeadline);
                    PageData.AddInt32(2);
                    PageData.AddString(Page.Text1);
                    PageData.AddString(Page.TextDetails);

                    break;

                case "pets":
                    PageData.AddString(Page.Layout);
                    PageData.AddInt32(2);
                    PageData.AddString(Page.LayoutHeadline);
                    PageData.AddString(Page.LayoutTeaser);
                    PageData.AddInt32(4);
                    PageData.AddString(Page.Text1);
                    PageData.AddString("Choose a name");
                    PageData.AddString("Choose a color");
                    PageData.AddString("Choose a race");

                    break;

                case "pets_norace":

                    PageData.AddString("pets");
                    PageData.AddInt32(2);
                    PageData.AddString(Page.LayoutHeadline);
                    PageData.AddString(Page.LayoutTeaser);
                    PageData.AddInt32(4);
                    PageData.AddString(Page.Text1);
                    PageData.AddString(string.Empty);
                    PageData.AddString("Choose a name");
                    PageData.AddString("Choose a color");

                    break;

                case "soundmachine":

                    PageData.AddString(Page.Layout);
                    PageData.AddInt32(2);
                    PageData.AddString(Page.LayoutHeadline);
                    PageData.AddString(Page.LayoutTeaser);
                    PageData.AddInt32(2);
                    PageData.AddString(Page.Text1);
                    PageData.AddString(Page.TextDetails);
                    break;

                case "club_buy":

                    PageData.AddString("vip_buy"); // layout
                    PageData.AddInt32(2);
                    PageData.AddString("ctlg_buy_vip_header");
                    PageData.AddString("ctlg_gift_vip_teaser");
                    PageData.AddInt32(0);
                    break;

                case "bots":
                    PageData.AddString(Page.Layout);
                    PageData.AddInt32(3);
                    PageData.AddString(Page.LayoutHeadline);
                    PageData.AddString(Page.LayoutTeaser);
                    PageData.AddString(Page.LayoutSpecial);
                    PageData.AddInt32(3);
                    PageData.AddString(Page.Text1);
                    PageData.AddString(Page.TextDetails);
                    PageData.AddString(Page.TextTeaser);
                    break;

                default:

                    PageData.AddString(Page.Layout);
                    PageData.AddInt32(3);
                    PageData.AddString(Page.LayoutHeadline);
                    PageData.AddString(Page.LayoutTeaser);
                    PageData.AddString(Page.LayoutSpecial);
                    PageData.AddInt32(3);
                    PageData.AddString(Page.Text1);
                    PageData.AddString(Page.TextDetails);
                    PageData.AddString(Page.TextTeaser);

                    break;
            }

            if (!Page.Layout.Equals("frontpage4") && !Page.Layout.Equals("club_buy"))
            {
                PageData.AddInt32(Page.Items.Values.Count);
                foreach (CatalogItem Item in Page.Items.Values)
                {
                    Item.Serialize(PageData);
                }
            }
            else
            {
                PageData.AddInt32(0);
            }

            PageData.AddInt32(0);
            PageData.AddBoolean(false);

            return PageData;
        }