예제 #1
0
        public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
        {
            if (!AuctionSystem.Running)
            {
                sender.Mobile.SendMessage(AuctionConfig.MessageHue, AuctionSystem.ST[15]);
                return;
            }

            switch (info.ButtonID)
            {
            case 0:

                if (m_Callback != null)
                {
                    try { m_Callback.DynamicInvoke(new object[] { sender.Mobile }); }
                    catch {}
                }
                break;

            case 1:                     // View your auctions

                sender.Mobile.SendGump(new AuctionListing(sender.Mobile, AuctionSystem.GetAuctions(sender.Mobile), false, false));
                break;

            case 2:                     // View your bids

                sender.Mobile.SendGump(new AuctionListing(sender.Mobile, AuctionSystem.GetBids(sender.Mobile), false, false));
                break;

            case 3:                     // View your pendencies

                sender.Mobile.SendGump(new AuctionListing(sender.Mobile, AuctionSystem.GetPendencies(sender.Mobile), false, false));
                break;
            }
        }
예제 #2
0
 public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
 {
     if (info.ButtonID == 1)
     {
         AuctionSystem.ForceDelete(sender.Mobile);
     }
 }
예제 #3
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 (!AuctionSystem.Running)
            {
                sender.Mobile.SendMessage(AuctionSystem.MessageHue, AuctionSystem.ST[15]);
                return;
            }

            switch (info.ButtonID)
            {
            case 0:                     // Exit

                break;

            case 1:                     // Create auction

                AuctionSystem.AuctionRequest(sender.Mobile);

                break;

            case 2:                     // View all auctions

                sender.Mobile.SendGump(new AuctionListing(
                                           sender.Mobile,
                                           AuctionSystem.Auctions,
                                           true,
                                           true));

                break;

            case 3:                     // View your auctions

                sender.Mobile.SendGump(new AuctionListing(
                                           sender.Mobile, AuctionSystem.GetAuctions(sender.Mobile), true, true));
                break;

            case 4:                     // View your bids

                sender.Mobile.SendGump(new AuctionListing(
                                           sender.Mobile, AuctionSystem.GetBids(sender.Mobile), true, true));
                break;

            case 5:                     // View pendencies

                sender.Mobile.SendGump(new AuctionListing(
                                           sender.Mobile, AuctionSystem.GetPendencies(sender.Mobile), true, true));
                break;
            }
        }
예제 #4
0
        public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
        {
            switch (info.ButtonID)
            {
            case 1:                     // Validate

                AuctionSystem.VerifyAuctions();
                AuctionSystem.VerifyPendencies();

                sender.Mobile.SendGump(new AuctionAdminGump(sender.Mobile));
                break;

            case 2:                     // Profile

                AuctionSystem.ProfileAuctions();

                sender.Mobile.SendGump(new AuctionAdminGump(sender.Mobile));
                break;

            case 3:                     // Disable

                AuctionSystem.Disable();
                sender.Mobile.SendMessage(AuctionConfig.MessageHue, "The system has been stopped. It will be restored with the next reboot.");
                break;

            case 4:                     // Delete

                sender.Mobile.SendGump(new DeleteAuctionGump(sender.Mobile));
                break;
            }
        }
예제 #5
0
        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)
            {
                AuctionSystem.ForceDelete(sender.Mobile);
            }
        }
예제 #6
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;
            }

            switch (info.ButtonID)
            {
            case 1:                     // Validate

                AuctionSystem.VerifyAuctions();
                AuctionSystem.VerifyPendencies();

                sender.Mobile.SendGump(new AuctionAdminGump(sender.Mobile));
                break;

            case 2:                     // Profile

                AuctionSystem.ProfileAuctions();

                sender.Mobile.SendGump(new AuctionAdminGump(sender.Mobile));
                break;

            case 3:                     // Disable

                AuctionSystem.Disable();
                sender.Mobile.SendMessage(AuctionSystem.MessageHue, "The system has been stopped. It will be restored with the next reboot.");
                break;

            case 4:                     // Delete

                sender.Mobile.SendGump(new DeleteAuctionGump(sender.Mobile));
                break;
            }
        }
예제 #7
0
        public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
        {
            if (!AuctionSystem.Running)
            {
                sender.Mobile.SendMessage(AuctionConfig.MessageHue, AuctionSystem.ST[15]);
                return;
            }

            switch (info.ButtonID)
            {
            case 0:                     // Exit
                break;

            case 1:                     // Create auction
                AuctionSystem.AuctionRequest(sender.Mobile);
                break;

            case 2:                     // View all auctions
                sender.Mobile.SendGump(new AuctionListing(sender.Mobile, AuctionSystem.Auctions, true, true));
                break;

            case 3:                     // View your auctions

                sender.Mobile.SendGump(new AuctionListing(sender.Mobile, AuctionSystem.GetAuctions(sender.Mobile), true, true));
                break;

            case 4:                     // View your bids

                sender.Mobile.SendGump(new AuctionListing(sender.Mobile, AuctionSystem.GetBids(sender.Mobile), true, true));
                break;

            case 5:                     // View pendencies

                sender.Mobile.SendGump(new AuctionListing(sender.Mobile, AuctionSystem.GetPendencies(sender.Mobile), true, true));
                break;
            }
        }
 public static void AuctionAnnounce()
 {
     AuctionSystem.ProfileAuctions();
 }
예제 #9
0
        public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
        {
            if (!AuctionSystem.Running)
            {
                sender.Mobile.SendMessage(AuctionConfig.MessageHue, AuctionSystem.ST[15]);
                return;
            }

            int             buttonid = info.ButtonID;
            AuctionComparer cmp      = null;

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

            switch (info.ButtonID)
            {
            case 0:     // Exit
                if (m_Callback != null)
                {
                    try { m_Callback.DynamicInvoke(new object[] { sender.Mobile }); }
                    catch { }
                }
                break;

            case 1:                     // Create auction
                AuctionSystem.AuctionRequest(sender.Mobile);
                break;

            case 2:                                                    // View all auctions

                cmp = new AuctionComparer(AuctionSorting.Date, false); //Sort by date newest first
                if (cmp != null)
                {
                    m_List.Sort(cmp);
                }

                sender.Mobile.SendGump(new AuctionListing(sender.Mobile, m_List, true, false));
                // sender.Mobile.SendGump(new AuctionListing(sender.Mobile, AuctionSystem.Auctions, true, false));
                break;

            case 3:                     // View your auctions

                sender.Mobile.SendGump(new AuctionListing(sender.Mobile, AuctionSystem.GetAuctions(sender.Mobile), true, false));
                break;


            case 4:                     // View your bids

                sender.Mobile.SendGump(new AuctionListing(sender.Mobile, AuctionSystem.GetBids(sender.Mobile), true, false));
                break;

            case 5:                     // View pendencies

                sender.Mobile.SendGump(new AuctionListing(sender.Mobile, AuctionSystem.GetPendencies(sender.Mobile), true, false));
                break;

            case 6:                                                       // View all auctions sorted by ending first

                cmp = new AuctionComparer(AuctionSorting.TimeLeft, true); //Sort by ending first
                if (cmp != null)
                {
                    m_List.Sort(cmp);
                }

                sender.Mobile.SendGump(new AuctionListing(sender.Mobile, m_List, true, false));
                break;
            }
        }
예제 #10
0
 /// <summary>
 /// Fires the DeadlineReached event
 /// </summary>
 private static void OnDeadlineReached()
 {
     AuctionSystem.OnDeadlineReached();
 }