AlphaDragon
Sorceror
Seems to work then get:
to much data pending, then core has stoped working.
Any Ideas?
to much data pending, then core has stoped working.
Any Ideas?
Code:
#region AuthorHeader
//
// Auction version 2.1, by Xanthos and Arya
//
// Based on original ideas and code by Arya
//
#endregion AuthorHeader
using System;
using Server;
using Server.Targeting;
using Server.Gumps;
namespace Arya.Auction
{
/// <summary>
/// General purpose target used by the auction system
/// </summary>
public class AuctionTarget : Target
{
private AuctionTargetCallback m_Callback;
public AuctionTarget( AuctionTargetCallback callback, int range, bool allowground ) : base( range, allowground, TargetFlags.None )
{
m_Callback = callback;
}
private void checktocontinue (Mobile from , object targeted)
{
if (from == null)
{
}
else
{
if (from.HasGump(typeof(NoticeGump)))
{
from.SendMessage("has gump notice. check");
checktocontinue(from, targeted);
return;
}
else// if(!(from.HasGump(typeof(NoticeGump))))
{
from.SendMessage("else has gump notice. check");
from.SendGump( new AuctionGump( from ) );
}
}
}
protected override void OnTarget(Mobile from, object targeted)
{
try
{
m_Callback.DynamicInvoke( new object[] { from, targeted } );
}
catch
{
// Console.WriteLine( "The auction system cannot access the cliloc.enu file. Please review the system instructions for proper installation" );
// from.SendMessage (38,"My manager changed his mind and wont add this item to the auctions.");
if (targeted != null)
{
from.SendMessage ("target ! null");
if (targeted is Item)
{
((Item)targeted).Visible = true;
from.SendGump( new NoticeGump( 1060637, 30720, "My Manager changed his mind and wont add this item to the auctions. For some reason he doesnt like the item.", 0xFFC000, 320, 240, null, null ) );
checktocontinue(from, targeted);
}
else
{
// from.SendMessage (38,"My manager changed his mind and wont add this item to the auctions.");
from.SendGump( new NoticeGump( 1060637, 30720, "My Manager changed his mind and wont add this to the auctions. I can always try something else. For some reason he doesnt like the item.", 0xFFC000, 320, 240, null, null ) );
checktocontinue(from, targeted);
}
}
else
{
from.SendMessage ("targeted was null");
}
}
}
protected override void OnTargetCancel(Mobile from, TargetCancelType cancelType)
{
if ( AuctionSystem.Running )
{
from.SendGump( new AuctionGump( from ) );
}
}
}
}