public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); m_Maabus = reader.ReadMobile() as Maabus; m_SpawnLocation = reader.ReadPoint3D(); Sleep(); }
public void Sleep() { if (m_Maabus == null) { return; } Effects.SendLocationParticles(EffectItem.Create(m_Maabus.Location, m_Maabus.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 0x7E7); Effects.PlaySound(m_Maabus.Location, m_Maabus.Map, 0x1FE); m_Maabus.Delete(); m_Maabus = null; foreach (MaabusCoffinComponent c in Components) { c.TurnToFull(); } }
public void Awake(Mobile caller) { if (m_Maabus != null || m_SpawnLocation == Point3D.Zero) { return; } foreach (MaabusCoffinComponent c in Components) { c.TurnToEmpty(); } m_Maabus = new Maabus(); m_Maabus.Location = m_SpawnLocation; m_Maabus.Map = Map; m_Maabus.Direction = m_Maabus.GetDirectionTo(caller); Timer.DelayCall(TimeSpan.FromSeconds(7.5), new TimerCallback(BeginSleep)); }