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