private void SwitchOwner(Mobile from)
{
if ( owner == null ) // double check..
{
owner = from;
from.SendMessage("You take possession of this homestone!");
RenameThisStone();
}
else
from.SendMessage( "This is not your homestone!" );
}
public override void OnAdded(IEntity parent)
{
base.OnAdded(parent);
if( this.Owner == null || this.Owner.Deleted ) // Owner is null or deleted?
{
this.Owner = this.RootParent as Mobile; // Set owner to the Mobile parent, or null if not a Mobile
}
}
var item = mobile.Backpack.FindItemByType<Homestone>();
if( item != null )
{
item.OnDoubleClick( mobile );
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.