RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Auction System

infra001

Wanderer
Here are the fixed scripts.

I tested many diffrent ButtonID's in RaZor Macros on every gump in the system, I replicated the crash on three diffrent gumps.

In two scripts I placed ButtonID's for the RaZor macro's that can cause a crash.
And in searchgump a change to the if ( info.TextEntries.

I spent about thirty minutes trying to crash the system after this with no luck so I'm quite sure that these were the only three gumps that could cause a crash.

Just replace the scripts with the following ones:


AuctionSearchGump.cs

Code:
using System;
using System.Collections;

using Server;
using Server.Gumps;
using Server.Items;

namespace Arya.Auction
{
	/// <summary>
	/// Summary description for AuctionSearchGump.
	/// </summary>
	public class AuctionSearchGump : Gump
	{
		private const int LabelHue = 0x480;
		private const int GreenHue = 0x40;
		private const int RedHue = 0x20;

		private ArrayList m_List;
		private bool m_ReturnToAuction;

		public AuctionSearchGump( Mobile m, ArrayList items, bool returnToAuction ) : base( 50, 50 )
		{
			m.CloseGump( typeof( AuctionSearchGump ) );

			m_List = items;
			m_ReturnToAuction = returnToAuction;

			MakeGump();
		}

		private void MakeGump()
		{
			this.Closable=true;
			this.Disposable=true;
			this.Dragable=true;
			this.Resizable=false;
			this.AddPage(0);
			this.AddImageTiled(49, 34, 402, 347, 3004);
			this.AddImageTiled(50, 35, 400, 345, 2624);
			this.AddAlphaRegion(50, 35, 400, 345);
			this.AddImage(165, 65, 10452);
			this.AddImage(0, 20, 10400);
			this.AddImage(0, 320, 10402);
			this.AddImage(35, 20, 10420);
			this.AddImage(421, 20, 10410);
			this.AddImage(410, 20, 10430);
			this.AddImageTiled(90, 32, 323, 16, 10254);
			this.AddLabel(185, 45, GreenHue, AuctionSystem.ST[ 32 ] );
			this.AddImage(420, 320, 10412);
			this.AddImage(0, 170, 10401);
			this.AddImage(420, 170, 10411);

			// TEXT 0 : Search text
			this.AddLabel(70, 115, LabelHue, AuctionSystem.ST[ 33 ] );
			this.AddImageTiled(145, 135, 200, 20, 3004);
			this.AddImageTiled(146, 136, 198, 18, 2624);
			this.AddAlphaRegion(146, 136, 198, 18);
			this.AddTextEntry(146, 135, 198, 20, RedHue, 0, @"");

			this.AddLabel(70, 160, LabelHue, AuctionSystem.ST[ 35 ] );

			this.AddCheck(260, 221, 2510, 2511, false, 1);
			this.AddLabel(280, 220, LabelHue, AuctionSystem.ST[ 35 ] );

			if ( Core.AOS )
			{
				this.AddCheck(260, 261, 2510, 2511, false, 9);
				this.AddLabel(280, 260, LabelHue, AuctionSystem.ST[ 36 ] );

				this.AddCheck(260, 241, 2510, 2511, false, 4);
				this.AddLabel(280, 240, LabelHue, AuctionSystem.ST[ 37 ] );
			}

			this.AddCheck(260, 201, 2510, 2511, false, 4);
			this.AddLabel(280, 200, LabelHue, AuctionSystem.ST[ 38 ] );

			this.AddCheck(260, 181, 2510, 2511, false, 5);
			this.AddLabel(280, 180, LabelHue, AuctionSystem.ST[ 39 ] );

			this.AddCheck(90, 181, 2510, 2511, false, 6);
			this.AddLabel(110, 180, LabelHue, AuctionSystem.ST[ 40 ] );

			this.AddCheck(90, 201, 2510, 2511, false, 7);
			this.AddLabel(110, 200, LabelHue, AuctionSystem.ST[ 41 ] );

			this.AddCheck(90, 221, 2510, 2511, false, 8);
			this.AddLabel(110, 220, LabelHue, AuctionSystem.ST[ 42 ] );

			this.AddCheck(90, 241, 2510, 2511, false, 2);
			this.AddLabel(110, 240, LabelHue, AuctionSystem.ST[ 43 ] );

			this.AddCheck(90, 261, 2510, 2511, false, 12);
			this.AddLabel(110, 260, LabelHue, AuctionSystem.ST[ 44 ] );

			if ( Core.AOS )
			{
				this.AddCheck(90, 280, 2510, 2511, false, 11);
				this.AddLabel(110, 279, LabelHue, AuctionSystem.ST[ 45 ] );

				this.AddCheck(260, 280, 2510, 2511, false, 10);
				this.AddLabel(280, 279, LabelHue, AuctionSystem.ST[ 46 ] );
			}

			// BUTTON 1 : Search
			this.AddButton(255, 350, 4005, 4006, 1, GumpButtonType.Reply, 0);
			this.AddLabel(295, 350, LabelHue, AuctionSystem.ST[ 16 ] );

			// BUTTON 0 : Cancel
			this.AddButton(85, 350, 4017, 4018, 0, GumpButtonType.Reply, 0);
			this.AddLabel(125, 350, LabelHue, AuctionSystem.ST[ 47 ] );
			
			// CHECK 0: Search withing existing results
			this.AddCheck(80, 310, 9721, 9724, false, 0);
			this.AddLabel(115, 312, LabelHue, AuctionSystem.ST[ 48 ] );
		}

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

			if ( info.ButtonID == 0 )
			{
				// Cancel
				sender.Mobile.SendGump( new AuctionListing( sender.Mobile, m_List, true, m_ReturnToAuction ) );
				return;
			}

			bool searchExisting = false;
			bool artifacts = false;
			bool commodity = false;
			ArrayList types = new ArrayList();
			string text = null;
			
			//Crash fix -LDL
			if ( info.TextEntries != null && info.TextEntries.Length > 0 && info.TextEntries[ 0 ].Text != null && info.TextEntries[ 0 ].Text.Length > 0 ) 
			{
				text = info.TextEntries[ 0 ].Text;
			}
			//Crash fix -LDL

			foreach( int check in info.Switches )
			{
				switch ( check )
				{
					case 0 : searchExisting = true;
						break;

					case 1: types.Add( typeof( MapItem ) );
						break;

					case 2: types.Add( typeof( BaseReagent ) );
						break;

					case 3: commodity = true;
						break;

					case 4:
						types.Add( typeof( StatCapScroll ) );
						types.Add( typeof( PowerScroll ) );
						break;

					case 5: types.Add( typeof( BaseJewel ) );
						break;

					case 6: types.Add( typeof( BaseWeapon ) );
						break;

					case 7: types.Add( typeof( BaseArmor ) );
						break;

					case 8: types.Add( typeof( BaseShield ) );
						break;

					case 9: artifacts = true;
						break;

					case 10: types.Add( typeof( Server.Engines.BulkOrders.SmallBOD ) );
						break;

					case 11: types.Add( typeof( Server.Engines.BulkOrders.LargeBOD ) );
						break;

					case 12:
						types.Add( typeof( BasePotion ) );
						types.Add( typeof( PotionKeg ) );
						break;
				}
			}

			ArrayList source = null;

			if ( searchExisting )
			{
				source = new ArrayList( m_List );
			}
			else
			{
				source = new ArrayList( AuctionSystem.Auctions );
			}

			ArrayList typeSearch = null;
			ArrayList commoditySearch = null;
			ArrayList artifactsSearch = null;

			if ( types.Count > 0 )
			{
				typeSearch = AuctionSearch.ForTypes( source, types );
			}

			if ( commodity )
			{
				commoditySearch = AuctionSearch.ForCommodities( source );
			}

			if ( artifacts )
			{
				artifactsSearch = AuctionSearch.ForArtifacts( source );
			}

			ArrayList results = new ArrayList();

			if ( typeSearch == null && artifactsSearch == null && commoditySearch == null )
			{
				results.AddRange( source );
			}
			else
			{
				if ( typeSearch != null )
					results.AddRange( typeSearch );

				if ( commoditySearch != null )
					results = AuctionSearch.Merge( results, commoditySearch );

				if ( artifactsSearch != null )
					results = AuctionSearch.Merge( results, artifactsSearch );
			}

			// Perform search
			if ( text != null )
			{
				results = AuctionSearch.SearchForText( results, text );
			}
			
			sender.Mobile.SendGump( new AuctionListing(
				sender.Mobile,
				results,
				true,
				m_ReturnToAuction ) );
		}
	}
}




BidViewGump.cs


Code:
using System;
using System.Collections;

using Server;
using Server.Gumps;

namespace Arya.Auction
{
	/// <summary>
	/// Summary description for BidViewGump.
	/// </summary>
	public class BidViewGump : Gump
	{
		private const int LabelHue = 0x480;
		private const int GreenHue = 0x40;
		private const int RedHue = 0x20;

		private AuctionGumpCallback m_Callback;
		private int m_Page;
		private ArrayList m_Bids;

		public BidViewGump( Mobile m, ArrayList bids, AuctionGumpCallback callback ) : this ( m, bids, callback, 0 )
		{
		}

		public BidViewGump( Mobile m, ArrayList bids, AuctionGumpCallback callback, int page ) : base( 100, 100 )
		{
			m.CloseGump( typeof( BidViewGump ) );
			m_Callback = callback;
			m_Page = page;
			m_Bids = new ArrayList( bids );

			MakeGump();
		}

		private void MakeGump()
		{
			int numOfPages =  ( m_Bids.Count - 1 ) / 10 + 1;

			if ( m_Bids.Count == 0 )
				numOfPages = 0;

			this.Closable=true;
			this.Disposable=true;
			this.Dragable=true;
			this.Resizable=false;
			this.AddPage(0);
			this.AddImageTiled(0, 0, 297, 282, 5174);
			this.AddImageTiled(1, 1, 295, 280, 2702);
			this.AddAlphaRegion(1, 1, 295, 280);
			this.AddLabel(12, 5, RedHue, AuctionSystem.ST[ 86 ] );

			this.AddLabel(160, 5, GreenHue, string.Format( AuctionSystem.ST[ 18 ] , m_Page + 1, numOfPages ) );
			this.AddImageTiled(10, 30, 277, 221, 5174);
			this.AddImageTiled(11, 31, 39, 19, 9274);
			this.AddAlphaRegion(11, 31, 39, 19);
			this.AddImageTiled(51, 31, 104, 19, 9274);
			this.AddAlphaRegion(51, 31, 104, 19);
			this.AddLabel(55, 30, GreenHue, AuctionSystem.ST[ 87 ] );
			this.AddImageTiled(156, 31, 129, 19, 9274);
			this.AddAlphaRegion(156, 31, 129, 19);
			this.AddLabel(160, 30, GreenHue, AuctionSystem.ST[ 88 ] );

			for ( int i = 0; i < 10; i++ )
			{
				this.AddImageTiled(11, 51 + i * 20, 39, 19, 9264);
				this.AddAlphaRegion(11, 51 + i * 20, 39, 19);
				this.AddImageTiled(51, 51 + i * 20, 104, 19, 9264);
				this.AddAlphaRegion(51, 51 + i * 20, 104, 19);
				this.AddImageTiled(156, 51 + i * 20, 129, 19, 9264);
				this.AddAlphaRegion(156, 51 + i * 20, 129, 19);

				if ( m_Page * 10 + i < m_Bids.Count )
				{
					Bid bid = m_Bids[ m_Page * 10 + i ] as Bid;
					this.AddLabel(15, 50 + i * 20, LabelHue, ( m_Page * 10 + i + 1 ).ToString() );
					this.AddLabelCropped( 55, 50 + i * 20, 100, 19, LabelHue, bid.Mobile != null ? bid.Mobile.Name : AuctionSystem.ST[ 78 ] );
					this.AddLabel(160, 50 + i * 20, LabelHue, bid.Amount.ToString() );
				}
			}

			this.AddButton(10, 255, 4011, 4012, 0, GumpButtonType.Reply, 0);
			this.AddLabel(48, 257, LabelHue, AuctionSystem.ST[ 89 ] );
			
			// PREV PAGE: 1
			if ( m_Page > 0 )
				this.AddButton(250, 8, 9706, 9707, 1, GumpButtonType.Reply, 0);

			// NEXT PAGE: 2
			if ( m_Page < numOfPages - 1 )
				this.AddButton(270, 8, 9702, 9703, 2, GumpButtonType.Reply, 0);
		}

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

			//Crash fix -LDL
			if ( info.ButtonID == 1 )
			{
				// Someone is calling a button that is illegal - Must be a exploiter ?
				
				return;
			}
			//Crash fix -LDL

			switch ( info.ButtonID )
			{
				case 0:

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

				case 1:

					sender.Mobile.SendGump( new BidViewGump( sender.Mobile, m_Bids, m_Callback, m_Page - 1 ) );
					break;

				case 2:

					sender.Mobile.SendGump( new BidViewGump( sender.Mobile, m_Bids, m_Callback, m_Page + 1 ) );
					break;
			}
		}
	}
}


AuctionListing.cs


Code:
using System;
using System.Collections;

using Server;
using Server.Gumps;

namespace Arya.Auction
{
	/// <summary>
	/// Lists auction items
	/// </summary>
	public class AuctionListing : Gump
	{
		private const int LabelHue = 0x480;
		private const int GreenHue = 0x40;
		private const int RedHue = 0x20;

		private bool m_EnableSearch;
		private int m_Page;
		private ArrayList m_List;
		private bool m_ReturnToAuction;

		public AuctionListing( Mobile m, ArrayList items, bool searchEnabled, bool returnToAuction, int page ) : base( 50, 50 )
		{
			m.CloseGump( typeof( AuctionListing ) );
			m_EnableSearch = searchEnabled;
			m_Page = page;
			m_List = new ArrayList( items );
			m_ReturnToAuction = returnToAuction;

			MakeGump();
		}

		public AuctionListing( Mobile m, ArrayList items, bool searchEnabled, bool returnToAuction ) : this( m, items, searchEnabled, returnToAuction, 0 )
		{
		}

		private void MakeGump()
		{
			this.Closable=true;
			this.Disposable=true;
			this.Dragable=true;
			this.Resizable=false;

			this.AddPage(0);

			this.AddImageTiled(49, 39, 402, 352, 3004);
			this.AddImageTiled(50, 40, 400, 350, 2624);
			this.AddAlphaRegion(50, 40, 400, 350);
			this.AddImage(165, 65, 10452);
			this.AddImage(0, 20, 10400);
			this.AddImage(0, 330, 10402);
			this.AddImage(35, 20, 10420);
			this.AddImage(421, 20, 10410);
			this.AddImage(410, 20, 10430);
			this.AddImageTiled(90, 32, 323, 16, 10254);
			this.AddLabel(160, 45, GreenHue, AuctionSystem.ST[ 8 ] );
			this.AddImage(420, 330, 10412);
			this.AddImage(420, 175, 10411);
			this.AddImage(0, 175, 10401);

			// Search: BUTTON 1
			if ( m_EnableSearch )
			{
				this.AddLabel(305, 120, LabelHue, AuctionSystem.ST[ 16 ] );
				this.AddButton(270, 120, 4005, 4006, 1, GumpButtonType.Reply, 0);
			}

			// Sort: BUTTON 2
			this.AddLabel(395, 120, LabelHue, AuctionSystem.ST[ 17 ] );
			this.AddButton(360, 120, 4005, 4006, 2, GumpButtonType.Reply, 0);

			while ( m_Page * 10 >= m_List.Count )
				m_Page--;

			if ( m_List.Count > 0 )
			{
				// Display the page number
				this.AddLabel( 360, 95, RedHue, string.Format( AuctionSystem.ST[ 18 ] , m_Page + 1, ( m_List.Count - 1 ) / 10 + 1 ) );

				this.AddLabel(70, 120, RedHue, string.Format( AuctionSystem.ST[ 19 ] , m_List.Count ) );
			}
			else
				this.AddLabel( 70, 120, RedHue, AuctionSystem.ST[ 20 ] );

			// Display items: BUTTONS 10 + i

			int lower = m_Page * 10;

			if ( m_List.Count > 0 )
			{
				for ( int i = 0; i < 10 && ( m_Page * 10 + i ) < m_List.Count; i++ )
				{
					AuctionItem item = m_List[ m_Page * 10 + i ] as AuctionItem;

					this.AddButton(115, 153 + i * 20, 5601, 5605, 10 + i, GumpButtonType.Reply, 0);
					this.AddLabelCropped( 140, 150 + i * 20, 260, 20, LabelHue, item.ItemName );
				}
			}

			// Next page: BUTTON 3
			if ( ( m_Page + 1 ) * 10 < m_List.Count )
			{
				this.AddLabel(355, 360, LabelHue, AuctionSystem.ST[ 22 ] );
				this.AddButton(315, 360, 4005, 4006, 3, GumpButtonType.Reply, 0);
			}

			// Previous page: BUTTON 4
			if ( m_Page > 0 )
			{
				this.AddLabel(180, 360, LabelHue, AuctionSystem.ST[ 21 ] );
				this.AddButton(280, 360, 4014, 4015, 4, GumpButtonType.Reply, 0);
			}
			
			// Close: BUTTON 0
			this.AddLabel(115, 360, LabelHue, AuctionSystem.ST[ 7 ] );
			this.AddButton(75, 360, 4017, 4018, 0, GumpButtonType.Reply, 0);
		}

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

			//Crash fix -LDL
			if ( info.ButtonID == 4 )
			{
				// Cancel
				sender.Mobile.SendGump( new AuctionListing( sender.Mobile, m_List, true, m_ReturnToAuction ) );
				return;
			}
			//Crash fix -LDL


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

					if ( m_ReturnToAuction )
						sender.Mobile.SendGump( new AuctionGump( sender.Mobile ) );
					else
						sender.Mobile.SendGump( new MyAuctionGump( sender.Mobile, null ) );
					break;

				case 1: // Search

					sender.Mobile.SendGump( new AuctionSearchGump(
						sender.Mobile,
						m_List,
						m_ReturnToAuction ) );
					break;

				case 2: // Sort

					sender.Mobile.SendGump( new AuctionSortGump(
						sender.Mobile,
						m_List,
						m_ReturnToAuction,
						m_EnableSearch ) );
					break;

				case 3: // Next page

					sender.Mobile.SendGump( new AuctionListing( sender.Mobile, m_List, m_EnableSearch, m_ReturnToAuction, m_Page +1 ) );
					break;

				case 4: // Previous page

					sender.Mobile.SendGump( new AuctionListing( sender.Mobile, m_List, m_EnableSearch, m_ReturnToAuction, m_Page - 1 ) );
					break;

				default:

					int index = m_Page * 10 + info.ButtonID - 10;

					if ( index < 0 || index >= m_List.Count )
					{
						// Apparently in some cases this can go out of bounds, investigating.

						sender.Mobile.SendMessage( AuctionSystem.MessageHue, AuctionSystem.ST[ 23 ] );

						if ( m_ReturnToAuction )
							sender.Mobile.SendGump( new AuctionGump( sender.Mobile ) );
						else
							sender.Mobile.SendGump( new MyAuctionGump( sender.Mobile, null ) );
						
						return;
					}

					AuctionItem item = m_List[ index ] as AuctionItem;

					if ( item != null )
					{
						if ( ( ! item.Expired || item.Pending ) && ( AuctionSystem.Auctions.Contains( item ) || AuctionSystem.Pending.Contains( item ) ) )
						{
							sender.Mobile.SendGump( new AuctionViewGump( sender.Mobile, item, new AuctionGumpCallback( ViewCallback ) ) );
						}
						else
						{
							sender.Mobile.SendMessage( AuctionSystem.MessageHue, AuctionSystem.ST[ 24 ] );
							sender.Mobile.SendGump( new AuctionListing( sender.Mobile, m_List, m_EnableSearch, m_ReturnToAuction, m_Page ) );
						}
					}

					break;
			}
		}

		private void ViewCallback( Mobile user )
		{
			user.SendGump( new AuctionListing( user, m_List, m_EnableSearch, m_ReturnToAuction, m_Page ) );
		}
	}
}

Enjoy using the great Auction by Ayra again :)
 

jaynigs

Wanderer
Great thanks for the fix, but now since i didnt have the latest version, it wont work and ary ahas taken of from the main page.... :mad:
 

TriMoon

Wanderer
Aww bah I just started to make my own private server and like this system, which i saw on your shard jaynigs ;), so i wanted to put that in also.
Ohh well perhaps after the fix...
 
S

shaDoze

Guest
The fixes posted above could solve the problem (haven't tested it yet) but it seems that you are removing some functionality. Perhaps it's better to check the Previous page case in each of those files:

(not a copy paste solution)
Code:
public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
{
	// ...
	case <previous page>:
	{
		if( m_Page > 0 )
			sender.SendGump( ..., m_Page - 1 ); // There is a previous page.
		else
			sender.SendGump( ..., m_Page ); // There is no previous page.

It would be even nicer if the core could register buttons added to the gump and only set the ButtonID to the reply value if it's a registered buttonID. This would solve the problem in all scripts, and a basic protection anyway.
 

infra001

Wanderer
As I said to Ayra, it's just a quick rough solution till she gets back to revise
the code, also to add it does not remove any functionality - I've been running the Auction system on Defiance for three days now without a hiccup, has 700 + auctions running.
 
S

shaDoze

Guest
No offence intended mate. I think it's good that people try to post fixes, solution and ofcourse scripts in general.

But this surely removes the previous page functionality:
Code:
//Crash fix -LDL
if ( info.ButtonID == 1 )
{
	// Someone is calling a button that is illegal - Must be a exploiter ?
	return;
}
//Crash fix -LDL

That is normally handled here:
Code:
switch ( info.ButtonID )
{
// ...
	case 1:
		sender.Mobile.SendGump( new BidViewGump( sender.Mobile, m_Bids, m_Callback, m_Page - 1 ) );
		break;
// ...

Ofcourse, the auction still works, just a tiny feature missing. As a rough solution it will do.
 

Sir Himmler

Wanderer
We've got this crash today when clicking over FORCE VERIFICATION at [auctionadmin gump.
Anyone had this problem?, anyone knows what could go wrong?.

Thank you!

Code:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Arya.Auction.AuctionItem.GiveItemTo(Mobile m, Item item)
   at Arya.Auction.AuctionItem.End(Mobile m)
   at Arya.Auction.AuctionSystem.VerifyAuctions()
   at Arya.Auction.AuctionAdminGump.OnResponse(NetState sender, RelayInfo info)
   at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)
 

jaynigs

Wanderer
Ok, ive seen some posts with problems with pets and id thought id add some reports from players that i have had,

If a pet has been on the auction for a few days, it just vanishes? the picture of the pet is no longer there and then you get a message saying the item is no longer available, or the picture is no longer there but the rest of the auction information is (such as price and the rest of the info), and then if someone buys the pet in this state they cannot stable it.. i was wondering if this may be due to them going wild whilst in the auction system? is that possible? or perhaps it is something else...
Anyone else have any thoughts on this?
 

jaynigs

Wanderer
Ok, i can confirm that pets do indeed go wild within the auction system and i have experienced this 1st hand, the auction had 6 days remaining an the picture of the horse was no longer available neither were the stats. i used my admin to "place the item into my pack and the horse appeared next to me and was wild.

Also this happens when you buy a pet form the auction and keep the auction ticket for a few days, the pet never gets to your stable as it is now gone wild.

so what happens to these pets that never get assigned a home? do they simply vanish? or do they remain in the system clogging it up?
 
man i feel pretty stupid now lol sorry i usually read the whole thread but somehow i mustve missed this one i been reading this forum for hours on end now maybe i need a rest lol
 

Kamron

Knight
A few concerns now

The button to permanently stop the auction system freezes the server and crashes it from out of memory problems. I don't know why exactly.. but it may have to do with the volume of auctions. We have approximately 750 auctions.

If an auction ends during a worldsave, it will cause an enumeration error when trying to move to the next item in serialization. This will crash your shard and corrupt your world.

When you close an auction (or end it?), the bidder's do not receive their gold back.

To address invalid buttons, use the default of the switch statement. And always have adequate buttonID range checks :)
 

jaynigs

Wanderer
XxSP1DERxX said:
If an auction ends during a worldsave, it will cause an enumeration error when trying to move to the next item in serialization. This will crash your shard and corrupt your world.


Surely this wont happen if you have your saves are based per hour, such as 60, 120 , 240 mins etc.

since you wont be able to add the item to the auction during the world save so the auction will never end on a world save.
 

Kamron

Knight
Its still possible because you can set the duration you want your auctions to be. Plus, a good coder never trusts the common sense of the poeple using their code.
 
C

chrisjones

Guest
Getting some crashes

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Mobiles.ExodusMinion.Damage(Int32 amount, Mobile from) in c:\Documents and Settings\user\My Documents\Ancient Lands\Scripts\Custom Scripts\Custom Mobiles\Hard\PlagueBeastLord\ExodusMinion.cs:line 145
at Server.Mobile.Damage(Int32 amount)
at Server.Spells.SpellDamageTimer.OnTick() in c:\Documents and Settings\user\My Documents\Ancient Lands\Scripts\Spells\Base\SpellHelper.cs:line 772
at Server.Timer.Slice()
at Server.Core.Main(String[] args)

Got that one followed by another which told of Arya auction system but deleted it by acceident sorry....
Anyways sorry i p[osted this here just thought u might want to see that it might be a reason or tie to yur scripts ...
O one other thing how do i completely wipe the aution from my shard i cant get it out ....
 

ditmar

Wanderer
XxSP1DERxX said:
A few concerns now

The button to permanently stop the auction system freezes the server and crashes it from out of memory problems. I don't know why exactly.. but it may have to do with the volume of auctions. We have approximately 750 auctions.

I had the same problem with my 300+ auctions. Had to end them manually and then use the permanently stop option. After reviewing the log files i found out the system seemed to hang at closing a certain auction and tried closing it multiple times untill it froze.

XxSP1DERxX said:
If an auction ends during a worldsave, it will cause an enumeration error when trying to move to the next item in serialization. This will crash your shard and corrupt your world.
I was having the same problem, and thought up two scripts that could be causing this. Thats why i took out the auction system in the first place. This seems like a logic reason for the save crash.

XxSP1DERxX said:
When you close an auction (or end it?), the bidder's do not receive their gold back.

To address invalid buttons, use the default of the switch statement. And always have adequate buttonID range checks :)

I hope Arya comes back soon to take care of the problems soon, my players miss the system a lot.
 
Top