Beispiel #1
0
 double resource( resource_e resource_type ) const
 {
   switch ( resource_type )
   {
     case RESOURCE_RUNIC_POWER:
     case RESOURCE_RAGE:
       return base_value() * ( 1 / 10.0 );
     case RESOURCE_MANA:
       return base_value() * ( 1 / 100.0 );
     default:
       return base_value();
   }
 }
 SAFE_NUMERIC_CONSTEXPR bool less_than_equal(const T & lhs, const U & rhs) {
     return checked::less_than_equal(base_value(lhs), base_value(rhs));
 }
 SAFE_NUMERIC_CONSTEXPR bool greater_than(const T & lhs, const U & rhs) {
     return checked::greater_than(base_value(lhs), base_value(rhs));
 }