コード例 #1
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            if (info.ButtonID == 1 || info.ButtonID == 2)             // See goods or Customize
            {
                m_Vendor.CheckTeleport(from);
            }

            if (!m_Vendor.CanInteractWith(from, true))
            {
                return;
            }

            switch (info.ButtonID)
            {
            case 1:                     // See goods
                m_Vendor.OpenBackpack(from);
                break;

            case 2:                     // Customize
                from.SendGump(new NewPlayerVendorCustomizeGump(m_Vendor));
                break;

            case 3:                     // Rename Shop
                m_Vendor.RenameShop(from);
                break;

            case 4:                     // Rename Vendor
                m_Vendor.Rename(from);
                break;

            case 5:                     // Open Paperdoll
                m_Vendor.DisplayPaperdollTo(from);
                break;

            case 6:                     // Collect Currency
                m_Vendor.CollectCurrency(from);
                break;

            case 7:                     // Dismiss Vendor
                m_Vendor.Dismiss(from);
                break;
            }
        }
コード例 #2
0
ファイル: PlayerVendorGumps.cs プロジェクト: kevin-10/TrueUO
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            if (info.ButtonID == 1 || info.ButtonID == 2) // See goods or Customize
            {
                m_Vendor.CheckTeleport(from);
            }

            if (!m_Vendor.CanInteractWith(from, true))
            {
                return;
            }

            switch (info.ButtonID)
            {
            case 1:     // See goods
            {
                m_Vendor.OpenBackpack(from);

                break;
            }

            case 2:     // Customize
            {
                from.SendGump(new NewPlayerVendorCustomizeGump(m_Vendor));

                break;
            }

            case 3:     // Rename Shop
            {
                m_Vendor.RenameShop(from);

                break;
            }

            case 4:     // Rename Vendor
            {
                m_Vendor.Rename(from);

                break;
            }

            case 5:     // Open Paperdoll
            {
                m_Vendor.DisplayPaperdollTo(from);

                break;
            }

            case 6:     // Collect Gold
            {
                m_Vendor.CollectGold(from);

                break;
            }

            case 7:     // Deposit Gold
            {
                m_Vendor.DepositeGold(from);

                break;
            }

            case 8:     // Dismiss Vendor
            {
                m_Vendor.Dismiss(from);

                break;
            }

            case 9:     // Opt Out of Search
            {
                if (m_Vendor.VendorSearch)
                {
                    m_Vendor.VendorSearch = false;
                }
                else
                {
                    m_Vendor.VendorSearch = true;
                }

                break;
            }
            }
        }