Effect() публичный Метод

public Effect ( Point3D loc, Map map, bool checkMulti ) : void
loc Point3D
map Map
checkMulti bool
Результат void
Пример #1
0
            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.
                }
            }
Пример #2
0
            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.
                }
            }
Пример #3
0
            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
                {
                    from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 501030, from.Name, ""));                         // I can not gate travel from that object.
                }
            }
Пример #4
0
            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.
                }
            }
Пример #5
0
            protected override void OnTarget(Mobile from, object o)
            {
                var 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)
                {
                    var 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
                {
                    from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 501030, from.Name, ""));
                    // I can not gate travel from that object.
                }
            }
Пример #6
0
            protected override void OnTarget(Mobile from, object o)
            {
                if (o is RecallRune)
                {
                    var 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)
                {
                    var 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)
                {
                    var boat = ((Key)o).Link as BaseBoat;

                    if (!boat.Deleted && boat.CheckKey(((Key)o).KeyValue))
                    {
                        m_Owner.Effect(boat.GetMarkedLocation(), boat.Map, false);
                    }
                    else
                    {
                        from.NetState.SendMessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 501030,
                                                           from.Name, ""); // I can not gate travel from that object.
                    }
                }
                else
                {
                    from.NetState.SendMessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 501030,
                                                       from.Name, ""); // I can not gate travel from that object.
                }
            }
Пример #7
0
            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 MessageLocalized( from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 501030, from.Name, "" ) ); // I can not gate travel from that object.
                 * }*/
                else
                {
                    from.Send(new AsciiMessage(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, "", " I can not gate travel from that object."));                        // I can not gate travel from that object.
                }
            }
Пример #8
0
            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(501803); // That rune is not yet marked.
                    }
                }
                else if (o is Runebook)
                {
                    RunebookEntry e = ((Runebook)o).Default;

                    if (e != null)
                    {
                        this.m_Owner.Effect(e.Location, e.Map, true);
                    }
                    else
                    {
                        from.SendLocalizedMessage(502354); // Target is not marked.
                    }
                }

                #region High Seas
                else if (o is ShipRune && ((ShipRune)o).Galleon != null)
                {
                    BaseGalleon galleon = ((ShipRune)o).Galleon;

                    if (!galleon.Deleted && galleon.Map != null && galleon.Map != Map.Internal && galleon.HasAccess(from))
                    {
                        m_Owner.Effect(galleon.GetMarkedLocation(), galleon.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.
                    }
                }
                #endregion

                #region New Magincia
                else if (o is Server.Engines.NewMagincia.WritOfLease)
                {
                    Server.Engines.NewMagincia.WritOfLease lease = (Server.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.
                    }
                }
                #endregion

                else
                {
                    from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 501030, from.Name, "")); // I can not gate travel from that object.
                }
            }
Пример #9
0
        public static void MoonGate_Callback(object state)
        {
            object[]        states  = ((object[])state);
            GateTravelSpell m_Spell = (GateTravelSpell)states[0];
            int             m_Step  = (int)states[1];
            Point3D         m_Loc   = (Point3D)states[2];
            Map             m_Map   = Map.Felucca;

            if (m_Spell.Runes != 0 && m_Spell.Runes != null && m_Loc.X == 0)
            {
                switch (m_Spell.Runes)
                {
                case 152:
                    m_Loc = new Point3D(3145, 3107, -4);
                    break;

                case 324:
                    m_Loc = new Point3D(3619, 2224, 1);
                    break;

                case 545:
                    m_Loc = new Point3D(3159, 1498, 31);
                    break;

                case 135:
                    m_Loc = new Point3D(4097, 1979, 1);
                    break;

                case 412:
                    m_Loc = new Point3D(3149, 405, 1);
                    break;

                case 345:
                    m_Loc = new Point3D(1083, 2989, -4);
                    break;

                case 213:
                    m_Loc = new Point3D(4582, 282, 1);
                    break;
                }
            }

            if (!m_Spell.Caster.Mounted && m_Spell.Caster.Body.IsHuman)
            {
                m_Spell.Caster.Animate(263, 7, 1, true, false, 0);
            }
            if (m_Step < 3)
            {
                m_Step++;
                Timer.DelayCall(TimeSpan.FromSeconds(1.5), new TimerStateCallback(MoonGate_Callback), new object[] { m_Spell, m_Step, m_Loc });
                AbilityCollection.AreaEffect(TimeSpan.FromSeconds(0.1), TimeSpan.FromSeconds(0.1), 0.1, m_Spell.Caster.Map, (Point3D)m_Spell.Caster.Location, 0x377A, 15, 0, 2, 8, 10, true, false, false);
                if (m_Loc.X != 0)
                {
                    AbilityCollection.AreaEffect(TimeSpan.FromSeconds(0.1), TimeSpan.FromSeconds(0.1), 0.1, m_Map, new Point3D(m_Loc.X, m_Loc.Y, m_Loc.Z + 5), 0x377A, 4, 0, 2, 8, 10, true, false, false);
                }
            }
            else if (m_Loc.X != 0)
            {
                m_Spell.Effect(m_Loc, m_Map, false);
                m_Spell.FinishSequence();
            }
            else
            {
                m_Spell.Caster.SendMessage("You have failed to open a gate to anywhere");
                m_Spell.DoFizzle();
                m_Spell.FinishSequence();
            }
        }
Пример #10
0
            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.
                }
            }