Exemplo n.º 1
0
        public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
        {
            if (info.ButtonID == 1)
            {
                MobileStatuette ms = m_Check.AuctionedItem as MobileStatuette;

                if (ms != null)
                {
                    ms.Stable(sender.Mobile);
                    m_Check.DeliveryComplete();
                    m_Check.Delete();
                }
            }
        }
Exemplo n.º 2
0
        private static void OnCreatureAuction(Mobile from, BaseCreature creature)
        {
            MobileStatuette ms = MobileStatuette.Create(from, creature);

            if (ms == null)
            {
                from.Target = new AuctionTarget(new AuctionTargetCallback(OnNewAuctionTarget), -1, false);
            }

            /*
             * Pets are auctioned within an item (MobileStatuette)
             *
             * The item's name is the type of the pet, the hue corresponds to the pet
             * and the item id is retrieved from the shrink table.
             *
             */

            AuctionItem auction = new AuctionItem(ms, from);

            from.SendGump(new NewAuctionGump(from, auction));
        }
        public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
        {
            int buttonid = info.ButtonID;

            if (buttonid < 0 || buttonid > 1)
            {
                sender.Mobile.SendMessage("Invalid option.  Please try again.");
                return;
            }

            if (info.ButtonID == 1)
            {
                MobileStatuette ms = m_Check.AuctionedItem as MobileStatuette;

                if (ms != null)
                {
                    ms.Stable(sender.Mobile);
                    m_Check.DeliveryComplete();
                    m_Check.Delete();
                }
            }
        }
Exemplo n.º 4
0
        public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
        {
            if (!m_Buttons.Contains(info.ButtonID))
            {
                Console.WriteLine(@"The auction system located a potential exploit. 
					Player {0} (Acc. {1}) tried to press an unregistered button in a gump of type: {2}"                    ,
                                  sender.Mobile != null ? sender.Mobile.ToString() : "Unkown",
                                  sender.Mobile != null && sender.Mobile.Account != null ? (sender.Mobile.Account as Server.Accounting.Account).Username : "******",
                                  this.GetType().Name);

                return;
            }

            if (info.ButtonID == 1)
            {
                MobileStatuette ms = m_Check.DeliveredItem as MobileStatuette;

                if (ms != null)
                {
                    ms.Stable(sender.Mobile);
                    m_Check.Delete();
                }
            }
        }