Пример #1
0
 public override void OnServerClose(NetState owner)
 {
     if (owner.Mobile is PlayerMobile)
     {
         UltimaStoreGump.ReleaseHidden(User);
     }
 }
Пример #2
0
        public override void OnResponse(RelayInfo info)
        {
            if (info.ButtonID == 195)
            {
                TextRelay amtText = info.GetTextEntry(0);

                if (amtText != null && !string.IsNullOrWhiteSpace(amtText.Text))
                {
                    int amount = Utility.ToInt32(amtText.Text);

                    if (amount > 0)
                    {
                        if (amount <= 10)
                        {
                            UltimaStore.GetProfile(User).SetCartAmount(Entry, amount);
                        }
                        else
                        {
                            User.SendLocalizedMessage(1150315); // That text is unacceptable.
                            //User.SendLocalizedMessage(1156836); // You can't exceed 125 items per purchase.
                        }

                        Gump.Refresh();
                    }
                }
                else
                {
                    User.SendLocalizedMessage(1150315); // That text is unacceptable.
                }
            }

            UltimaStoreGump.ReleaseHidden(User);
        }
Пример #3
0
        public override void OnResponse(RelayInfo info)
        {
            if (info.ButtonID == 195)
            {
                UltimaStore.TryPurchase(User);
            }

            UltimaStoreGump.ReleaseHidden(User);
        }
Пример #4
0
        public ConfirmCartGump(PlayerMobile pm, UltimaStoreGump gump, StoreEntry entry, int current = 0)
            : base(pm, gump.X + (760 / 2) - 205, gump.Y + (574 / 2) - 100)
        {
            Gump    = gump;
            Entry   = entry;
            Current = current;

            pm.CloseGump(typeof(ConfirmCartGump));
        }
Пример #5
0
        public override void OnResponse(RelayInfo info)
        {
            if (info.ButtonID == 195)
            {
                if (!string.IsNullOrEmpty(Configuration.Website))
                {
                    User.LaunchBrowser(Configuration.Website);
                }
                else
                {
                    User.LaunchBrowser("https://uo.com/ultima-store/");
                }
            }

            UltimaStoreGump.ReleaseHidden(User);
        }