숙련도에 훈련과 사기 적용

This commit is contained in:
2018-02-19 09:05:40 -08:00
parent ae883353b3
commit 337fcdf85c
3 changed files with 19 additions and 15 deletions
+2 -1
View File
@@ -1080,11 +1080,12 @@ function getGenDex($general, $type) {
return $general["dex{$type}"];
}
function addGenDex($connect, $no, $type, $exp) {
function addGenDex($connect, $no, $atmos, $train, $type, $exp) {
$type = floor($type / 10) * 10;
$dexType = "dex{$type}";
if($type == 30) { $exp = round($exp * 0.90); } //귀병은 90%효율
elseif($type == 40) { $exp = round($exp * 0.90); } //차병은 90%효율
$exp = $exp * $atmos/100 * $train/100;
$query = "update general set {$dexType}={$dexType}+{$exp} where no='$no'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");