I am in the process of trying to get 2 items to be linked. I have added a new property to the items called "Linkring". I am using the serial number to link the items. The issue I am having is in the ontarget to get the serial number to load into the current ring's property. This my code for the target.
Code:
public class WeddingRingTarget : Target
{
//WeddingRing m_Ring;
Item m_Linkring;
public WeddingRingTarget( Item ring ) : base( 18, false, TargetFlags.None )
{
m_Linkring = ring;
}
protected override void OnTarget( Mobile from, object target )
{
if( target is WeddingRing )
{
Item item = (Item)target;
if( item.RootParent == from )
{
item.Linkring = Targeted.Serial;
from.SendMessage( "The ring has been linked." );
}
}