public Effect ( Point3D loc, Map map, bool checkMulti ) : void | ||
loc | Point3D | |
map | Map | |
checkMulti | bool | |
return | void |
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.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 { 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) { IEntity entity = o as IEntity; if (XmlScript.HasTrigger(entity, TriggerName.onTargeted) && UberScriptTriggers.Trigger(entity, from, TriggerName.onTargeted, null, null, m_Owner)) { return; } 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.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 Key && ((Key)o).KeyValue != 0 && ((Key)o).Link is BaseBoat ) * { * BaseBoat boat = ((Key)o).Link as BaseBoat; * * if ( boat != null && !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 { 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.SendAsciiMessage("That rune is not yet marked."); // 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.SendAsciiMessage("Target is not marked."); // 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 AsciiMessage( from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, "", "I can not recall from that object." ) ); // I can not recall from that object. * }*/ else { from.Send(new AsciiMessage(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, "", "I can not recall from that object.")); // 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, true); } 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 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. } }
public override void OnCast() { RecallSpell m_Owner = this; Mobile from = Caster; if (SphereSpellTarget is RecallRune) { RecallRune rune = (RecallRune)SphereSpellTarget; if (Caster.InLOS(rune) || (from.BankBox != null && rune.IsChildOf(from.BankBox))) { if (rune.Marked) { if (rune.ChargesLeft == 0) { from.LocalOverheadMessage(MessageType.Regular, 906, true, "The recall rune's magic has faded"); DoFizzle(); return; } if (rune.ChargesLeft <= 10 && rune.ChargesLeft >= 1) { from.LocalOverheadMessage(MessageType.Regular, 906, true, "The recall rune is starting to fade"); } m_Owner.Effect(rune.Target, rune.TargetMap, true); } else { from.SendLocalizedMessage(501805); // That rune is not yet marked. if (from is PlayerMobile) { ((PlayerMobile)from).SpellCheck(); } } } else { Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 501031); // I cannot see that object. if (from is PlayerMobile) { ((PlayerMobile)from).SpellCheck(); } } } else if (SphereSpellTarget is Runebook) { RunebookEntry e = ((Runebook)SphereSpellTarget).Default; if (e != null) { m_Owner.Effect(e.Location, e.Map, true); } else { from.SendLocalizedMessage(502354); // Target is not marked. } } else if (SphereSpellTarget is Key && ((Key)SphereSpellTarget).KeyValue != 0 && ((Key)SphereSpellTarget).Link is BaseBoat) { BaseBoat boat = ((Key)SphereSpellTarget).Link as BaseBoat; if (!boat.Deleted && boat.CheckKey(((Key)SphereSpellTarget).KeyValue)) { m_Owner.Effect(boat.GetMarkedLocation(), boat.Map, false); boat.Refresh(); } else { from.LocalOverheadMessage(MessageType.Regular, 906, 502357); // I can not recall from that object. } } else if (m_Entry != null) { /*if (m_Entry.ChargesLeft == 0) * { * from.LocalOverheadMessage(MessageType.Regular, 906, true, "The runebook's recall rune's magic has faded"); * DoFizzle(); * return; * } * else if (m_Entry.ChargesLeft <= 10 && m_Entry.ChargesLeft >= 1) * from.LocalOverheadMessage(MessageType.Regular, 906, true, "The recall rune in your runebook is starting to fade"); */ m_Owner.Effect(m_Entry.Location, m_Entry.Map, true); } else { from.LocalOverheadMessage(MessageType.Regular, 906, 502357); // I can not recall from that object. // if (from is PlayerMobile) // ((PlayerMobile)from).SpellCheck(); } }
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.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 SoulSliver) { SoulSliver soul = (SoulSliver)o; if (soul.Marked) { TeiravonMobile summoned = soul.Target as TeiravonMobile; if (summoned.Map != Map.Internal && summoned != null) { m_Owner.Summon(soul); } else { from.SendMessage("The soul lies dormant and does not answer your summons."); } } else { from.SendMessage("This sliver has not been attuned."); } } 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 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. } }