Exemple #1
0
 public static void SetMindRotScalar(Mobile caster, Mobile target, double scalar, TimeSpan duration)
 {
     if (!m_Table.ContainsKey(target))
     {
         MRBucket tmpB = new MRBucket(scalar, new MRExpireTimer(caster, target, duration));
         m_Table.Add(target, tmpB);
         BuffInfo.AddBuff(target, new BuffInfo(BuffIcon.Mindrot, 1075665, duration, target));
         tmpB.m_MRExpireTimer.Start();
         target.SendLocalizedMessage(1074384);
     }
 }
Exemple #2
0
        public static bool GetMindRotScalar(Mobile m, ref double scalar)
        {
            if (!m_Table.ContainsKey(m))
            {
                return(false);
            }

            MRBucket tmpB = (MRBucket)m_Table[m];

            scalar = tmpB.m_Scalar;
            return(true);
        }
Exemple #3
0
        public static void ClearMindRotScalar(Mobile m)
        {
            if (!m_Table.ContainsKey(m))
            {
                return;
            }

            BuffInfo.RemoveBuff(m, BuffIcon.Mindrot);
            MRBucket      tmpB = (MRBucket)m_Table[m];
            MRExpireTimer tmpT = tmpB.m_MRExpireTimer;

            tmpT.Stop();
            m_Table.Remove(m);
            m.SendLocalizedMessage(1060872); // Your mind feels normal again.
        }
        public static void SetMindRotScalar( Mobile caster, Mobile target, double scalar, TimeSpan duration )
        {
            if (!HasMindRotScalar(target))
            {
                MRExpireTimer tmpT = new MRExpireTimer(caster, target, duration);
                MRBucket tmpB = new MRBucket( scalar, tmpT );

                m_Table.Add(target, tmpB );
                BuffInfo.AddBuff(target, new BuffInfo(BuffIcon.Mindrot, 1075665, duration, target));
                tmpT.Start();
                target.SendLocalizedMessage( 1074384 );
            }
        }