Example #1
0
        public void Replicate(Mobile newVictim)
        {
            Type       affliction    = this.GetType();
            Object     o             = Activator.CreateInstance(affliction);
            Affliction newAffliction = (Affliction)o;

            ApplyAffliction(newVictim, m_Severity);
            newAffliction.Victim = newVictim;

            newAffliction.MoveToWorld(newVictim.Location, newVictim.Map);
        }
Example #2
0
        public bool HasType(Mobile m)
        {
            foreach (Item found in World.Items.Values)
            {
                if (found is Affliction)
                {
                    Affliction existing = (Affliction)found;

                    if (existing.Victim == m && existing.Type == m_Type)
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }
Example #3
0
 public AfflictionTimer(Affliction affliction, double period)
     : base(TimeSpan.FromSeconds(period), TimeSpan.FromMinutes(period))
 {
     m_Affliction = affliction;
 }