public static int GetValue( Mobile m, AbsorptionAttribute attribute ) { int value = 0; foreach ( var item in m.GetEquippedItems() ) { if ( item is IAbsorption ) { AbsorptionAttributes attrs = ( (IAbsorption) item ).AbsorptionAttributes; if ( attrs != null ) value += attrs[attribute]; } } return value; }
public AbsorptionAttrInfo(AbsorptionAttribute attr, int min, int max) { m_Attribute = attr; m_MinIntensity = min; m_MaxIntensity = max; }
public int this[AbsorptionAttribute attribute] { get { return GetValue( (int)attribute ); } set { SetValue( (int)attribute, value ); } }