code cleaning

This commit is contained in:
lopar
2018-03-04 04:13:54 +02:00
parent 62afbff63a
commit 4f46e7e5ed
11 changed files with 9 additions and 625 deletions
+5 -5
View File
@@ -61,7 +61,7 @@ function getuserdata($id = 0)
if (!$id) return array();
$rec = db::c()->query('SELECT `hp`, `maxhp`, `fullhptime`, `battle` FROM `users` WHERE `id` = "?s"', $id)->fetch_assoc();
if ($rec['hp'] < $rec['maxhp'] && time() > $rec['fullhptime'] && !$rec['battle'] && ($rec['hp'] > 0)) {
regenhp($rec, 0);
// regenhp($rec, 0);
if ($rec['hp'] == $rec['maxhp']) {
$rec['hp']--;
}
@@ -73,9 +73,9 @@ if (!isset($user)) {
$user = getuserdata();
}
if (empty($user['battle']) && ($user['hp'] < @$user['maxhp'])) {
regenhp($user);
}
//if (empty($user['battle']) && ($user['hp'] < @$user['maxhp'])) {
// regenhp($user);
//}
$inder = filter_input(INPUT_COOKIE, 'inder');
@@ -324,7 +324,7 @@ function battlewithbot($b, $name = '', $time = 3, $blood = 1, $group = 1, $battl
function backpacksize($u = 0)
{
{ // $l * 10 +5
$l = 0;
if ($u) {
$l = $u['level'];