コード例 #1
0
ファイル: Catalog.cs プロジェクト: fuding/Coolmemes
        internal void GetCatalogPage()
        {
            int PageId = Request.PopWiredInt32();

            Request.PopWiredInt32();
            string CatalogType = Request.PopFixedString();

            if (CatalogType == "NORMAL")
            {
                CatalogPage Page = OtanixEnvironment.GetGame().GetCatalog().GetPage(PageId);

                if (Page == null || !Page.Enabled || !Page.Visible || Page.MinRank > Session.GetHabbo().Rank)
                {
                    return;
                }

                Session.SendMessage(Page.GetMessage);
            }
            else if (CatalogType == "BUILDERS_CLUB")
            {
                CatalogPremiumPage Page = OtanixEnvironment.GetGame().GetCatalogPremium().GetPage(PageId);

                if (Page == null || !Page.Enable || !Page.Visible)
                {
                    return;
                }

                Session.SendMessage(Page.GetMessage());
            }
        }
コード例 #2
0
        internal void GetCatalogPage()
        {
            int PageId = Request.PopWiredInt32();

            Request.PopWiredInt32();
            string CatalogType = Request.PopFixedString();

            if (CatalogType == "NORMAL")
            {
                CatalogPage Page = OtanixEnvironment.GetGame().GetCatalog().GetPage(PageId);

                if (Page == null || !Page.Enabled || !Page.Visible || Page.MinRank > Session.GetHabbo().Rank)
                {
                    return;
                }

                if (Page.Layout.Equals("vip_buy"))
                {
                    ServerMessage Message = new ServerMessage(Outgoing.ClubComposer);
                    Message.AppendInt32(Page.Items.Values.Count);
                    foreach (CatalogItem Item in Page.Items.Values)
                    {
                        Item.SerializeClub(Message, Session);
                    }
                    Message.AppendInt32(1);
                    Session.SendMessage(Page.GetMessage);
                    Session.SendMessage(Message);
                }

                else
                {
                    Session.SendMessage(Page.GetMessage);
                }
            }
            else if (CatalogType == "BUILDERS_CLUB")
            {
                CatalogPremiumPage Page = OtanixEnvironment.GetGame().GetCatalogPremium().GetPage(PageId);

                if (Page == null || !Page.Enable || !Page.Visible)
                {
                    return;
                }

                Session.SendMessage(Page.GetMessage());
            }
        }