Преглед на файлове

Fixed Capping of Values (#8257)

- Values that are added together will now be correctly capped to their max value
- Status resistance can no longer exceed 100% (made negative success rates become positive)
Playtester преди 1 година
родител
ревизия
cd7341930e
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 1 2
      src/common/utilities.hpp

+ 1 - 2
src/common/utilities.hpp

@@ -278,9 +278,8 @@ namespace rathena {
 
 			if( rathena::util::safe_addition( a, b, result ) ){
 				return cap;
-			}else{
-				return result;
 			}
+			return std::min(result, cap);
 		}
 
 		template <typename T> void tolower( T& string ){