protected override void OnTarget(Mobile from, object o) { if (o is RecallRune) { RecallRune rune = (RecallRune)o; if (rune.Marked) { m_Owner.Effect(rune.Target, rune.TargetMap, true); } else { from.SendLocalizedMessage(501803); // That rune is not yet marked. } } else if (o is HouseRaffleDeed && ((HouseRaffleDeed)o).ValidLocation()) { HouseRaffleDeed deed = (HouseRaffleDeed)o; m_Owner.Effect(deed.PlotLocation, deed.PlotFacet, true); } 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) { m_Owner.Effect(rune.Target, rune.TargetMap, true); } else { from.SendLocalizedMessage(501803); // That rune is not yet marked. } } else if (o is Runebook) { RunebookEntry e = ((Runebook)o).Default; if (e != null) { 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, 501030, from.Name, "")); // I can not gate travel from that object. } else if (o is HouseRaffleDeed && ((HouseRaffleDeed)o).ValidLocation()) { HouseRaffleDeed deed = (HouseRaffleDeed)o; m_Owner.Effect(deed.PlotLocation, deed.PlotFacet, true); } 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) { 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) { 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.LocalOverheadMessage(MessageType.Regular, 906, 502357); // 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 { from.LocalOverheadMessage(MessageType.Regular, 906, 502357); // I can not recall from that object. } }
public void Target(object o) { if (o is RecallRune rune) { if (rune.Marked) { Effect(rune.Target, rune.TargetMap, true); } else { Caster.SendLocalizedMessage(501803); // That rune is not yet marked. } } else if (o is Runebook runebook) { RunebookEntry e = runebook.Default; if (e != null) { Effect(e.Location, e.Map, true); } else { Caster.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, 501030, from.Name, "" ) ); // I can not gate travel from that object. * }*/ else if (o is HouseRaffleDeed deed1 && deed1.ValidLocation()) { HouseRaffleDeed deed = deed1; Effect(deed.PlotLocation, deed.PlotFacet, true); }
protected override void OnTarget(Mobile from, object o) { if (o is RecallRune) { RecallRune rune = (RecallRune)o; if (rune.Marked) { this.m_Owner.Effect(rune.Target, rune.TargetMap, true); } else { from.SendLocalizedMessage(501805); // That rune is not yet 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)) { this.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; this.m_Owner.Effect(deed.PlotLocation, deed.PlotFacet, true); } else { from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 502357, from.Name, "")); // I can not recall 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. } }
protected override void OnTarget(Mobile from, object o) { if (o is RecallRune) { RecallRune rune = (RecallRune)o; if (rune.Marked) { 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) { m_Owner.Effect(e.Location, e.Map, true); } else { from.SendLocalizedMessage(502354); // Target is not marked. } } else if (o is RuneTome) { RuneTome runeTome = o as RuneTome; RuneTomeRuneEntry defaultRuneEntry = null; foreach (RuneTomeRuneEntry entry in runeTome.m_RecallRuneEntries) { if (entry == null) { continue; } if (entry.m_IsDefaultRune) { defaultRuneEntry = entry; break; } } if (defaultRuneEntry == null) { if (runeTome.m_RecallRuneEntries.Count > 0) { defaultRuneEntry = runeTome.m_RecallRuneEntries[0]; } else { from.SendMessage("There are no recall runes stored within this rune tome."); return; } } if (defaultRuneEntry != null) { m_Owner.Effect(defaultRuneEntry.m_Target, defaultRuneEntry.m_TargetMap, true); } } else if (o is ShipRune) { ShipRune rune = (ShipRune)o; BaseShip m_Ship; if (rune.m_Ship != null) { m_Ship = rune.m_Ship; if (m_Ship.Deleted) { from.SendMessage("The ship bound to this rune no longer exists."); return; } if (m_Ship.Owner == from) { m_Ship.TransferEmbarkedMobile(from); m_Owner.Effect(m_Ship.GetRandomEmbarkLocation(true), m_Ship.Map, false); } else { from.SendMessage("You must be the owner of that ship to use this rune."); } } else { from.SendMessage("The ship bound to this rune no longer exists."); } } else if (o is HouseRaffleDeed && ((HouseRaffleDeed)o).ValidLocation()) { HouseRaffleDeed deed = (HouseRaffleDeed)o; m_Owner.Effect(deed.PlotLocation, deed.PlotFacet, true); } else { from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 502357, from.Name, "")); // I can not recall from that object. } }
protected override void OnTarget(Mobile from, object o) { if (o is RecallRune) { RecallRune rune = (RecallRune)o; if (rune.Marked) { m_Owner.Effect(rune.Target, rune.TargetMap, true); } else { from.SendLocalizedMessage(501803); // That rune is not yet marked. } } else if (o is Runebook) { RunebookEntry e = ((Runebook)o).Default; if (e != null) { 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 BaseShip) { // BaseShip ship = ((Key)o).Link as BaseShip; // if ( !ship.Deleted && ship.CheckKey( ((Key)o).KeyValue ) ) // m_Owner.Effect( ship.GetMarkedLocation(), ship.Map, false ); // else from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 501030, from.Name, "")); // I can not gate travel from that object. } else if (o is RuneTome) { RuneTome runeTome = o as RuneTome; RuneTomeRuneEntry defaultRuneEntry = null; foreach (RuneTomeRuneEntry entry in runeTome.m_RecallRuneEntries) { if (entry == null) { continue; } if (entry.m_IsDefaultRune) { defaultRuneEntry = entry; break; } } if (defaultRuneEntry == null) { if (runeTome.m_RecallRuneEntries.Count > 0) { defaultRuneEntry = runeTome.m_RecallRuneEntries[0]; } else { from.SendMessage("There are no recall runes stored within this rune tome."); return; } } if (defaultRuneEntry != null) { m_Owner.Effect(defaultRuneEntry.m_Target, defaultRuneEntry.m_TargetMap, true); } } else if (o is HouseRaffleDeed && ((HouseRaffleDeed)o).ValidLocation()) { HouseRaffleDeed deed = (HouseRaffleDeed)o; m_Owner.Effect(deed.PlotLocation, deed.PlotFacet, true); } 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) { 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) { m_Owner.Effect(e.Location, e.Map, true); } else { from.SendLocalizedMessage(502354); // Target is not marked. } } else if (o is BoatRune) { BoatRune rune = (BoatRune)o; BaseBoat m_Boat; if (rune.m_Boat != null) { m_Boat = rune.m_Boat; if (m_Boat.Deleted) { from.SendMessage("The boat bound to this rune no longer exists."); return; } if (m_Boat.Owner == from) { m_Boat.TransferEmbarkedMobile(from); m_Owner.Effect(m_Boat.GetRandomEmbarkLocation(true), m_Boat.Map, false); } else { from.SendMessage("You must be the owner of that ship to use this rune."); } } else { from.SendMessage("The boat bound to this rune no longer exists."); } } else if (o is HouseRaffleDeed && ((HouseRaffleDeed)o).ValidLocation()) { HouseRaffleDeed deed = (HouseRaffleDeed)o; m_Owner.Effect(deed.PlotLocation, deed.PlotFacet, true); } else { from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 502357, from.Name, "")); // I can not recall from that object. } }