Exemplo n.º 1
0
        public void TurnToBones()
        {
            if (Deleted)
            {
                return;
            }

            ProcessDelta();
            SendRemovePacket();
            ItemID = Utility.Random(0xECA, 9); // bone graphic
            Hue    = 0;
            ProcessDelta();

            SetFlag(CorpseFlag.NoBones, true);
            SetFlag(CorpseFlag.IsBones, true);

            var delay = Owner?.CorpseDecayTime ?? Mobile.DefaultCorpseDecay;

            m_DecayTime = DateTime.UtcNow + delay;

            if (!TimerRegistry.UpdateRegistry(m_TimerID, this, delay))
            {
                TimerRegistry.Register(m_TimerID, this, delay, TimerPriority.FiveSeconds, c => c.DoDecay());
            }
        }
Exemplo n.º 2
0
 protected void PlaySound()
 {
     if (Active)
     {
         Effects.PlaySound(Location, Map, Utility.RandomList(0x1DC, 0x210, 0x2F4));
         TimerRegistry.UpdateRegistry(_TimerID, this, TimeSpan.FromSeconds(Utility.RandomMinMax(5, 25)));
     }
     else
     {
         TimerRegistry.RemoveFromRegistry(_TimerID, this);
     }
 }
Exemplo n.º 3
0
        public static void OnTick(FelineBlessedStatue statue)
        {
            if (statue.Movable)
            {
                statue.StopTimer();
                return;
            }

            statue.DropResource();

            TimerRegistry.UpdateRegistry(TimerID, statue, RespawnDuration);
            statue.NextReagentTime = DateTime.UtcNow + RespawnDuration;
        }