示例#1
0
            private void TeleportTo(Mobile target)
            {
                Point3D from = m_Owner.Location;
                Point3D to   = target.Location;

                m_Owner.Location = to;

                Effects.SendLocationParticles(EffectItem.Create(from, m_Owner.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
                Effects.SendLocationParticles(EffectItem.Create(to, m_Owner.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);

                m_Owner.PlaySound(0x1FE);
            }
示例#2
0
            protected override void OnTick()
            {
                if (m_Owner.Deleted)
                {
                    Stop();
                    return;
                }

                if ((m_Stage++ % 4) == 0 || !m_Owner.Move(m_Owner.Direction))
                {
                    m_Owner.Direction = (Direction)Utility.Random(8);
                }

                if (m_Stage > 16)
                {
                    Effects.SendLocationParticles(EffectItem.Create(m_Owner.Location, m_Owner.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
                    m_Owner.PlaySound(0x1FE);

                    m_Owner.Delete();
                }
            }
示例#3
0
            private void TeleportTo(Mobile target)
            {
                Spells.SpellHelper.Turn(m_Owner, target);
                Point3D from = m_Owner.Location;
                Point3D to   = target.Location;

                GuardedRegion reg = (GuardedRegion)Region.Find(to, target.Map).GetRegion(typeof(GuardedRegion));

                //Stop following them if they are out of guarded area
                if (reg == null || reg.Disabled)
                {
                    Stop();
                }

                m_Owner.Location = to;

                Effects.SendLocationParticles(EffectItem.Create(from, m_Owner.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
                Effects.SendLocationParticles(EffectItem.Create(to, m_Owner.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);

                m_Owner.PlaySound(0x1FE);
            }
示例#4
0
            private void TeleportTo(Mobile target)
            {
                if (m_TeleportTo == true)
                {
                    m_TeleportTo = false;

                    Point3D from = m_Owner.Location;
                    //10OCT2007 Adjust InstaKill Distance *** START ***
                    //Instead of teleporting on top of the player, make it a few spaces away.
                    //Point3D to = target.Location;
                    Point3D toclose = target.Location;
                    Point3D to      = new Point3D(toclose.X + (Utility.RandomMinMax(-5, 5)), toclose.Y + (Utility.RandomMinMax(-5, 5)), toclose.Z);
                    //10OCT2007 Adjust InstaKill Distance *** END   ***

                    m_Owner.Location = to;

                    Effects.SendLocationParticles(EffectItem.Create(from, m_Owner.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
                    Effects.SendLocationParticles(EffectItem.Create(to, m_Owner.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);

                    m_Owner.PlaySound(0x1FE);
                }
            }