protected override void OnTick()
            {
                Item target = _Teleporter.LinkedTeleporter;

                if (_Teleporter.LinkedTeleporter == null || _Teleporter.LinkedTeleporter.Deleted || _Mobile.Location != _Teleporter.Location ||
                    _Mobile.Map != _Teleporter.Map)
                {
                    return;
                }

                Point3D p   = target.GetWorldTop();
                Map     map = target.Map;

                BaseCreature.TeleportPets(_Mobile, p, map);

                Effects.SendFlashEffect(_Mobile, (FlashType)2);

                _Mobile.MoveToWorld(p, map);

                _Teleporter.Charges--;

                Effects.SendFlashEffect(_Mobile, (FlashType)2);

                if (!_Mobile.Hidden || _Mobile.AccessLevel < AccessLevel.Counselor)
                {
                    Effects.PlaySound(target.Location, target.Map, 0x1FE);

                    Effects.SendLocationParticles(
                        EffectItem.Create(_Teleporter.Location, _Teleporter.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023, 0);
                    Effects.SendLocationParticles(
                        EffectItem.Create(target.Location, target.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023, 0);

                    new EffectTimer(target.Location, target.Map, 2023, -1, TimeSpan.FromSeconds(0.4)).Start();
                }
            }
Ejemplo n.º 2
0
            protected override void OnTick()
            {
                Item target = m_Teleporter.m_Target;

                if (target != null && !target.Deleted)
                {
                    Mobile m = m_Mobile;

                    if (m.Location == m_Teleporter.Location && m.Map == m_Teleporter.Map)
                    {
                        Point3D p   = target.GetWorldTop();
                        Map     map = target.Map;

                        Server.Mobiles.BaseCreature.TeleportPets(m, p, map);

                        m.MoveToWorld(p, map);

                        if (!m.Hidden || m.AccessLevel == AccessLevel.Player)
                        {
                            Effects.PlaySound(target.Location, target.Map, 0x1FE);

                            Effects.SendLocationParticles(EffectItem.Create(m_Teleporter.Location, m_Teleporter.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023, 0);
                            Effects.SendLocationParticles(EffectItem.Create(target.Location, target.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023, 0);

                            new EffectTimer(target.Location, target.Map, 2023, -1, TimeSpan.FromSeconds(0.4)).Start();
                        }
                    }
                }
            }
Ejemplo n.º 3
0
            protected override void OnTick()
            {
                Item target = m_Teleporter.Target;

                if (target?.Deleted != false)
                {
                    return;
                }

                Mobile m = m_Mobile;

                if (m.Location != m_Teleporter.Location || m.Map != m_Teleporter.Map)
                {
                    return;
                }

                Point3D p   = target.GetWorldTop();
                Map     map = target.Map;

                BaseCreature.TeleportPets(m, p, map);

                m.MoveToWorld(p, map);

                if (m.Hidden && m.AccessLevel != AccessLevel.Player)
                {
                    return;
                }

                Effects.PlaySound(target.Location, target.Map, 0x1FE);

                Effects.SendLocationParticles(
                    EffectItem.Create(m_Teleporter.Location, m_Teleporter.Map, EffectItem.DefaultDuration),
                    0x3728, 10, 10, 2023, 0);
                Effects.SendLocationParticles(
                    EffectItem.Create(target.Location, target.Map, EffectItem.DefaultDuration), 0x3728, 10, 10,
                    5023, 0);

                new EffectTimer(target.Location, target.Map, 2023, -1, TimeSpan.FromSeconds(0.4)).Start();
            }