コード例 #1
0
        public override void OnExit(Mobile m)
        {
            m.SendMessage("Your health regeneration has returned to normal.", this.Name);

            if (m is PlayerMobile)
            {
                for (int i = 0; i < PlayerTimers.Count; ++i)
                {
                    if (PlayerTimers[i] != null && ((HealTimer)PlayerTimers[i]).m == m)
                    {
                        HealTimer timer = (HealTimer)PlayerTimers[i];
                        timer.Stop();
                        PlayerTimers[i] = null;
                    }
                }
            }
            int count = 0;

            for (int j = 0; j < PlayerTimers.Count; ++j)
            {
                if (PlayerTimers[j] == null)
                {
                    count++;
                }
            }
            if (count == PlayerTimers.Count)
            {
                PlayerTimers.Clear();
            }
        }
コード例 #2
0
        public override void OnEnter(Mobile m)
        {
            if (!Controller.InUse)
            {
                return;
            }

            m.SendMessage("Your health is being regenerated faster!");

            if (m is PlayerMobile)
            {
                HealTimer timer = new HealTimer(m);
                PlayerTimers.Add(timer);
                timer.Start();
            }

            m.Delta(MobileDelta.Noto);
            m.InvalidateProperties();
        }
コード例 #3
0
        public override void OnEnter(Mobile m)
        {
        	if (!Controller.InUse)
                return;
        
			m.SendMessage("Your health is being regenerated faster!");
			
            if (m is PlayerMobile) 
            { 
            	HealTimer timer = new HealTimer( m );
            	PlayerTimers.Add(timer);
          		timer.Start();
            }
            
            m.Delta(MobileDelta.Noto);
            m.InvalidateProperties();
        }