protected override void OnTarget(Mobile from, object o) { if (o is RecallRune) { RecallRune rune = (RecallRune)o; if (rune.Marked) { if (rune.Type == RecallRuneType.Ship) { m_Owner.Effect(rune.Galleon); } else { m_Owner.Effect(rune.Target, rune.TargetMap, true); } } else { from.SendLocalizedMessage(501805); // That rune is not yet marked. } } else if (o is Runebook) { RunebookEntry e = ((Runebook)o).Default; if (e != null) { if (e.Type == RecallRuneType.Ship) { m_Owner.Effect(e.Galleon); } else { m_Owner.Effect(e.Location, e.Map, true); } } else { from.SendLocalizedMessage(502354); // Target is not marked. } } else if (o is Engines.NewMagincia.WritOfLease) { Engines.NewMagincia.WritOfLease lease = (Engines.NewMagincia.WritOfLease)o; if (lease.RecallLoc != Point3D.Zero && lease.Facet != null && lease.Facet != Map.Internal) { m_Owner.Effect(lease.RecallLoc, lease.Facet, false); } else { from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 502357, from.Name, "")); // I can not recall from that object. } } else { from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 501030, from.Name, "")); // I can not gate travel from that object. } }
protected override void OnTarget(Mobile from, object o) { if (o is RecallRune) { RecallRune rune = (RecallRune)o; if (rune.Marked) { if (rune.Type == RecallRuneType.Ship) { m_Owner.Effect(rune.Galleon); } else { m_Owner.Effect(rune.Target, rune.TargetMap, true); } } else { from.SendLocalizedMessage(501805); // That rune is not yet marked. } } else if (o is Runebook) { RunebookEntry e = ((Runebook)o).Default; if (e != null) { if (e.Type == RecallRuneType.Ship) { m_Owner.Effect(e.Galleon); } else { m_Owner.Effect(e.Location, e.Map, true); } } else { from.SendLocalizedMessage(502354); // Target is not marked. } } else if (o is Key && ((Key)o).KeyValue != 0 && ((Key)o).Link is BaseBoat) { BaseBoat boat = ((Key)o).Link as BaseBoat; if (!boat.Deleted && boat.CheckKey(((Key)o).KeyValue)) { m_Owner.Effect(boat.GetMarkedLocation(), boat.Map, false); } else { from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 502357, from.Name, "")); // I can not recall from that object. } } else if (o is HouseRaffleDeed && ((HouseRaffleDeed)o).ValidLocation()) { HouseRaffleDeed deed = (HouseRaffleDeed)o; m_Owner.Effect(deed.PlotLocation, deed.PlotFacet, true); } else if (o is Engines.NewMagincia.WritOfLease) { Engines.NewMagincia.WritOfLease lease = (Engines.NewMagincia.WritOfLease)o; if (lease.RecallLoc != Point3D.Zero && lease.Facet != null && lease.Facet != Map.Internal) { m_Owner.Effect(lease.RecallLoc, lease.Facet, false); } else { from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 502357, from.Name, "")); // I can not recall from that object. } } else { from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 502357, from.Name, "")); // I can not recall from that object. } }