Exemple #1
0
 public BaseAttributes(Item owner, BaseAttributes other)
 {
     m_Owner  = owner;
     m_Values = new int[other.m_Values.Length];
     other.m_Values.CopyTo(m_Values, 0);
     m_Names = other.m_Names;
 }
Exemple #2
0
        private static bool SupportsAttributes(Item item, string name, out BaseAttributes attrs)
        {
            PropertyInfo pi = item.GetType().GetProperty(name);

            if (pi == null)
            {
                attrs = null;
                return(false);
            }

            return((attrs = pi.GetValue(item, null) as BaseAttributes) != null);
        }
		public BaseAttributes( Item owner, BaseAttributes other )
		{
			m_Owner = owner;
			m_Values = new int[other.m_Values.Length];
			other.m_Values.CopyTo( m_Values, 0 );
			m_Names = other.m_Names;
		}
Exemple #4
0
 public static string ToString(this BaseAttributes attr, double val, bool html = true)
 {
     return(GetPropertyString(val, html));
 }
Exemple #5
0
		private static bool SupportsAttributes(Item item, string name, out BaseAttributes attrs)
		{
			var pi = item.GetType().GetProperty(name);

			if (pi == null)
			{
				attrs = null;
				return false;
			}

			return (attrs = pi.GetValue(item, null) as BaseAttributes) != null;
		}