예제 #1
0
 public static void SetMindRotScalar(Mobile caster, Mobile target, double scalar, TimeSpan duration)
 {
     if (!m_Table.ContainsKey(target))
     {
         m_Table.Add(target, new MRBucket(scalar, new MRExpireTimer(caster, target, duration)));
         BuffInfo.AddBuff(target, new BuffInfo(BuffIcon.Mindrot, 1075665, duration, target));
         MRBucket      tmpB = (MRBucket)m_Table[target];
         MRExpireTimer tmpT = tmpB.m_MRExpireTimer;
         tmpT.Start();
         target.SendLocalizedMessage(1074384);
     }
 }
예제 #2
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.
        }
예제 #3
0
 public MRBucket(double theScalar, MRExpireTimer theTimer)
 {
     m_Scalar        = theScalar;
     m_MRExpireTimer = theTimer;
 }
예제 #4
0
파일: MindRot.cs 프로젝트: Leorgrium/runuo
 public MRBucket(double theScalar, MRExpireTimer theTimer)
 {
     m_Scalar = theScalar;
     m_MRExpireTimer = theTimer;
 }
예제 #5
0
        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 );
            }
        }