Exemplo n.º 1
0
 public override void OnServerClose(NetState owner)
 {
     if (owner.Mobile is PlayerMobile)
     {
         UltimaStoreGump.ReleaseHidden(User);
     }
 }
Exemplo n.º 2
0
        public override void OnResponse(RelayInfo info)
        {
            if (info.ButtonID == 195)
            {
                TextRelay amtText = info.GetTextEntry(0);

                if (amtText != null && !String.IsNullOrEmpty(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);
        }
Exemplo n.º 3
0
        public override void OnResponse(RelayInfo info)
        {
            if (info.ButtonID == 195)
            {
                UltimaStore.TryPurchase(User);
            }

            UltimaStoreGump.ReleaseHidden(User);
        }
Exemplo n.º 4
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);
        }