From e7a7b0e70592a0312f23793bf508445c4d5aea6f Mon Sep 17 00:00:00 2001 From: hecht Date: Mon, 13 Feb 2012 18:51:19 +0000 Subject: [PATCH] okay, it is now possible to adjust the char level factor (1 is default) --- ag/include/exp.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ag/include/exp.inc.php b/ag/include/exp.inc.php index 635a93b..c2cf818 100644 --- a/ag/include/exp.inc.php +++ b/ag/include/exp.inc.php @@ -8,7 +8,9 @@ include_once (ROOT_PATH . '/include/char.inc.php'); include_once (ROOT_PATH . '/include/arena.inc.php'); +include_once (ROOT_PATH . '/include/defines.inc.php'); +defineIfNotDefined('CHAR_LEVEL_EXP_FACTOR', 1); function beautifyNumericValue($value, $step){ // RUNDEN(POTENZ(10;ABRUNDEN(MAX(LOG(I3;10);2)))/4;0) @@ -30,7 +32,9 @@ function calculateRequiredExpChars($level){ $g09 = pow($level*$level,9) * pow(10,-30); $g10 = pow($level*$level,10) * pow(10,-33); - return beautifyNumericValue($g01 + $g02 + $g03 + $g04 + $g06 + $g07 + $g08 + $g09 + $g10, 8); + $result = $g01 + $g02 + $g03 + $g04 + $g06 + $g07 + $g08 + $g09 + $g10; + $result = round($result * CHAR_LEVEL_EXP_FACTOR,0); + return beautifyNumericValue($result, 8); // return $g01 + $g02 + $g03 + $g04 + $g06 + $g07 + $g08 + $g09 + $g10; }