Функция повышения статов и модификаторов. Отладка 7.

This commit is contained in:
lopar 2018-12-11 23:06:04 +02:00
parent 9e7e70db41
commit 235a2dad8d

View File

@ -2899,7 +2899,7 @@ function addOnePoint($name, $param = null)
} elseif ($param == 'mastery' AND in_array($name, $allowed_mastery)) {
$mastery_level = db::c()->query('SELECT ?f FROM `users` WHERE `id` = ?i', $name, $_SESSION['uid'])->fetch_assoc();
if ($mastery_level[$name] < 10) {
db::c()->query('UPDATE `users` SET ?f = ?f + 1, `stats` = `stats` - 1 WHERE `id` = ?i', $name, $name, $_SESSION['uid']);
db::c()->query('UPDATE `users` SET ?f = ?f + 1, `master` = `master` - 1 WHERE `id` = ?i', $name, $name, $_SESSION['uid']);
echo "<span style='color:darkgreen'>Параметр {$naming[$name]} увеличен на 1 ед.</span>";
} else echo "<span style='color: maroon;'>Ошибка: параметр достиг максимального значения!</span>";
} else return null;