Remove unused
This commit is contained in:
@@ -178,18 +178,18 @@ function level_up($uid)
|
||||
/*
|
||||
* Проверка делающая левелап и ограничитель максимального уровня.
|
||||
*/
|
||||
if (isset($_SESSION['uid'])) {
|
||||
try {
|
||||
$userInfo = db::c()->query('SELECT `exp`, `nextup`, `level` FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
|
||||
if ($userInfo && ($userInfo['exp'] >= $userInfo['nextup']) && $userInfo['level'] < 50) {
|
||||
level_up($_SESSION['uid']);
|
||||
$levelUpArray = ['nextup' => $nextup, 'stats' =>];
|
||||
db::c()->query('UPDATE users SET ?Ai, stats = (stats +2), level = (level +1) WHERE id = ?i', $levelUpArray, $_SESSION['uid']);
|
||||
}
|
||||
} catch (\Krugozor\Database\Mysql\Exception $e) {
|
||||
echo $e->getTraceAsString();
|
||||
}
|
||||
}
|
||||
//if (isset($_SESSION['uid'])) {
|
||||
// try {
|
||||
// $userInfo = db::c()->query('SELECT `exp`, `nextup`, `level` FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
|
||||
// if ($userInfo && ($userInfo['exp'] >= $userInfo['nextup']) && $userInfo['level'] < 50) {
|
||||
// level_up($_SESSION['uid']);
|
||||
// $levelUpArray = ['nextup' => $nextup, 'stats' =>];
|
||||
// db::c()->query('UPDATE users SET ?Ai, stats = (stats +2), level = (level +1) WHERE id = ?i', $levelUpArray, $_SESSION['uid']);
|
||||
// }
|
||||
// } catch (\Krugozor\Database\Mysql\Exception $e) {
|
||||
// echo $e->getTraceAsString();
|
||||
// }
|
||||
//}
|
||||
|
||||
function savecavedata($cavedata, $caveleader, $floor)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user