예제 #1
0
        public override void OnExit(Mobile m)
        {
            m.SendMessage("Your mana regeneration has returned to normal.", this.Name);

            if (m is PlayerMobile)
            {
                for (int i = 0; i < PlayerTimers.Count; ++i)
                {
                    if (PlayerTimers[i] != null && ((HealManaTimer)PlayerTimers[i]).m == m)
                    {
                        HealManaTimer timer = (HealManaTimer)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();
            }
        }
        public override void OnEnter(Mobile m)
        {
        	if (!Controller.InUse)
                return;
                
			m.SendMessage("Your mana is being regenerated faster!");
			
            if (m is PlayerMobile) 
            { 
            	HealManaTimer timer = new HealManaTimer( 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 mana is being regenerated faster!");

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

            m.Delta(MobileDelta.Noto);
            m.InvalidateProperties();
        }