コード例 #1
0
ファイル: SAPropEffects.cs プロジェクト: Crome696/ServUO
        public PropertyEffect(Mobile from, Item owner, EffectsType effect, TimeSpan duration, TimeSpan tickduration)
        {
            m_Mobile = from;
            m_Owner = owner;
            m_Effect = effect;
            m_Duration = duration;
            m_TickDuration = tickduration;

            m_Effects.Add(this);

            if (m_TickDuration > TimeSpan.MinValue)
                StartTimer();
        }
コード例 #2
0
ファイル: SAPropEffects.cs プロジェクト: Crome696/ServUO
        public static PropertyEffect GetContext(Mobile from, EffectsType type)
        {
            foreach (PropertyEffect e in m_Effects)
            {
                if (e.Mobile == from && e.Effect == type)
                    return e;
            }

            return null;
        }
コード例 #3
0
ファイル: SAPropEffects.cs プロジェクト: Crome696/ServUO
        public static void RemoveContext(Mobile from, EffectsType type)
        {
            PropertyEffect effect = GetContext(from, type);

            if (effect != null)
                effect.RemoveEffects();
        }
コード例 #4
0
ファイル: SAPropEffects.cs プロジェクト: Crome696/ServUO
 public static bool IsUnderEffects(Mobile from, EffectsType effect)
 {
     foreach (PropertyEffect e in m_Effects)
     {
         if (e.Mobile == from && e.Effect == effect)
             return true;
     }
     return false;
 }
コード例 #5
0
 public static T GetContext <T>(Mobile from, Mobile victim, EffectsType type) where T : PropertyEffect
 {
     return(m_Effects.FirstOrDefault(e => e.Mobile == from && e.Victim == victim && e.Effect == type) as T);
 }
コード例 #6
0
 public abstract Effects GetEffects(EffectsType effectType);