So I've been slowly putting together an updated version of Tru's Voodoo Doll package, and I've run into an issue.
You can "animate" a voodoo doll now. However, I can't assign any additional properties, besides list.Add (summoned) for (GetProperties, AddNameProperties), I'm getting this:
Of course, removing GetProperties works just fine, but why isn't this working?
The Animated Doll, before animating, is basically a BaseImprisonedMobile. It lasts for 60 seconds, and deletes itself.
If it's been released, it's not summoned anymore...so the values that were passed to the Animated Doll, should be wiped out upon release. I don't see that happening here...and I am certain I'm overthinking this now :|
You can "animate" a voodoo doll now. However, I can't assign any additional properties, besides list.Add (summoned) for (GetProperties, AddNameProperties), I'm getting this:
Code:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Mobiles.AnimatedVoodooDoll.GetProperties(ObjectPropertyList list)
at Server.Mobile.get_PropertyList()
at Server.Mobile.get_OPLPacket()
at Server.Mobile.SendIncomingPacket()
at Server.Mobile.MoveToWorld(Point3D newLocation, Map map)
at Server.Mobiles.BaseCreature.Summon(BaseCreature creature, Boolean controlled, Mobile caster, Point3D p, Int32 sound, TimeSpan duration)
at Server.Spells.SpellHelper.Summon(BaseCreature creature, Mobile caster, Int32 sound, TimeSpan duration, Boolean scaleDuration, Boolean scaleStats)
at Server.Items.VoodooDoll.OnDoubleClick(Mobile from)
at Server.Mobile.Use(Item item)
at Server.Engines.XmlSpawner2.XmlAttach.UseReq(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
Of course, removing GetProperties works just fine, but why isn't this working?
Code:
public override void GetProperties( ObjectPropertyList list )
{
base.GetProperties( list );
list.Add( 1049646 ); // (summoned)
if ( Controlled || Summoned )
{
list.Add("a voodoo doll of {0}", m_CursedPerson.Name);
list.Add(String.Format("<BASEFONT COLOR=#cc33ff>Created by {0}", this.SummonMaster.Name));
}
else
list.Add(this.Name);
}
If it's been released, it's not summoned anymore...so the values that were passed to the Animated Doll, should be wiped out upon release. I don't see that happening here...and I am certain I'm overthinking this now :|