Added serialization.
Was not aware this was an issue, this is the first Ive heard. I'll look into it.
RunUO - [www.runuo.com] Version 2.4, Build 5043.26752
Core: Running on .NET Framework Version 4.0.30319
RandomImpl: CSPRandom (Software)
Scripts: Compiling C# scripts...done (0 errors, 0 warnings)
Scripts: Skipping VB.NET Scripts...done (use -vb to enable)
Scripts: Verifying...done (3012 items, 748 mobiles) (3.82 seconds)
Regions: Loading...done
World: Loading...done (107228 items, 2663 mobiles) (4.27 seconds)
Restricting client version to 7.0.3.0. Action to be taken: LenientKick
Core: Using standard save strategy
World: Saving...Closing Save Files.
Save done in 0.18 seconds.
System.NullReferenceException: Object reference not set to an instance of an obj
ect.
at Server.Items.CellarAddon2.TryInitialise()
at Server.Items.CellarAddon2.OnMapChange()
at Server.Item.MoveToWorld(Point3D location, Map map)
at Server.Commands.Add.Build(Mobile from, Point3D start, Point3D end, Constru
ctorInfo ctor, Object[] values, String[,] props, PropertyInfo[] realProps, List`
1 packs, Boolean outline, Boolean mapAvg)
Hi Tru,
I downloaded and edited BaseHouse.cs as suggested . . . works like a dream . . nice work.
Three questions (first two are maybe dumb).
1) If you place secures or lock downs in the cellar than remove the Addon with an axe, the secures are still under the house. They are still locked down - do they eventually decay?
2) Similar - if the house is dropped the lock downs in the cellar are still locked down under ground. Do they eventually decay?
3) have you thought about having walls being auto added around the floor of the cellar to make it look more realistic? (maybe use same type as the Stair Teleporter).
Thanks Tru - good work!
Karma to you.
protected override void OnTarget( Mobile from, object targeted )
{
//************************************************************
if ( targeted is AddonComponent )
{
CellarAddon2 cellar = new CellarAddon2();
if ( !(targeted is CellarTeleporter3) )
{
from.SendMessage("You must use that on the bookcase to remove the cellar!");
return;
}
if (targeted is CellarTeleporter3)
{
CellarDeed2 deed = new CellarDeed2();
if ( from != null )
{
cellar.Delete();
from.AddToBackpack(deed);
}
}
}
//************************************************************
//**************************************************************
else if ( (item is AddonComponent) && ( (item.ItemID == 2711) || (item.ItemID == 1823) || (item.ItemID == 0x177D) || (item.ItemID == 0x31F4) || (item.ItemID == 0x51a) || (item.ItemID == 0x4ff) || (item.ItemID == 0x521) || (item.ItemID == 0x4b8) ) )
{
from.SendLocalizedMessage( 1062491 ); // You cannot use the house decorator on that object.
}
//**************************************************************