Exemplo n.º 1
0
        public static HealthAttachment GetHA(Mobile m)
        {
            if (m == null)
                return null;

            HealthAttachment ha = XmlAttach.FindAttachment(m, typeof(HealthAttachment)) as HealthAttachment;
            if (ha == null)
            {
                ha = new HealthAttachment();
                XmlAttach.AttachTo(m, ha);
            }

            return ha;
        }
Exemplo n.º 2
0
 public InjuryTimer(Injury i, HealthAttachment ha)
     : base(TimeSpan.FromSeconds(Utility.Random(300)), TimeSpan.FromMinutes(1))
 {
     m_Injury = i;
     m_HA = ha;
     m_RecoveryTime = m_HA.RecoveryTime;
     Priority = TimerPriority.OneMinute;
     m_StartTime = DateTime.Now;
 }