- ServUO Version
- Publish Unknown
- Ultima Expansion
- Endless Journey
Perhaps someone can help me, I am trying to delete a deed on gump reponse but am getting a crash, here is the gump and related crash log.
From testing it is crashing on this:
C#:
public class BreedingAcceptGumpInstant : Gump
{
private Mobile m_Pet1;
private Mobile m_Pet2;
private InstantBreedDeed m_Deed;
public BreedingAcceptGumpInstant(Mobile pet1, Mobile pet2) : base(0, 0)
{
InstantBreedDeed deed = m_Deed as InstantBreedDeed;
m_Pet1 = pet1;
m_Pet2 = pet2;
if (bc1 != null || bc2 != null)
{
//bc1.MatingDelay = DateTime.UtcNow + TimeSpan.FromHours(144.0);
//bc2.MatingDelay = DateTime.UtcNow + TimeSpan.FromHours(144.0);
bc1.MatingDelay = DateTime.UtcNow + TimeSpan.FromSeconds( 0.1 );
bc2.MatingDelay = DateTime.UtcNow + TimeSpan.FromSeconds( 0.1 );
}
m_Deed.Delete(); // Delete the deed
}
}
C#:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Items.BreedingAcceptGumpInstnat.OnResponse(NetState state, RelayInfo info)
at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc) in C:\ServUO\Server\Network\PacketHandlers.cs:line 1457
at Knives.TownHouses.GumpResponse.DisplayGumpResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns) in C:\ServUO\Server\Network\MessagePump.cs:line 347
at Server.Network.MessagePump.Slice() in C:\ServUO\Server\Network\MessagePump.cs:line 136
at Server.Core.Main(String[] args) in C:\ServUO\Server\Main.cs:line 676
From testing it is crashing on this:
C#:
m_Deed.Delete(); // Delete the deed
Last edited: