Ejemplo n.º 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;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
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;
		}
Ejemplo n.º 4
0
 public static string ToString(this BaseAttributes attr, double val, bool html = true)
 {
     return(GetPropertyString(val, html));
 }
Ejemplo n.º 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;
		}