protected override void OnTick() { HouseTeleporter target = m_Teleporter.Target; if (target != null && !target.Deleted) { Mobile m = m_Mobile; if (m.X == m_Teleporter.X && m.Y == m_Teleporter.Y && 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(); } } } }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 1: { m_Level = (SecureLevel)reader.ReadInt(); goto case 0; } case 0: { m_Target = reader.ReadItem <HouseTeleporter>(); if (version < 0) { m_Level = SecureLevel.Anyone; } break; } } }
public HouseTeleporter(int itemId, HouseTeleporter target) : base(itemId) { LootType = LootType.Blessed; Movable = false; Weight = 1.0; m_Level = SecureLevel.Anyone; m_Target = target; }
public DelayTimer(HouseTeleporter tp, Mobile m) : base(TimeSpan.FromSeconds(1.0)) { m_Teleporter = tp; m_Mobile = m; }