From 3ec3d3956c11781f3d5fc7c21c0a60d3e15707fe Mon Sep 17 00:00:00 2001 From: lopar Date: Sun, 5 Jul 2020 10:12:48 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=BD=D0=BE=D1=81=20HT?= =?UTF-8?q?ML=20=D0=B2=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81.=20=D0=94=D0=B0=20?= =?UTF-8?q?=D0=B3=D0=BE=D0=B2=D0=BD=D1=8F=D0=BD=D0=BE,=20=D0=BD=D0=BE=20?= =?UTF-8?q?=D0=BD=D0=B5=20=D0=BD=D0=B0=D1=88=D1=91=D0=BB=20=D1=81=D0=BF?= =?UTF-8?q?=D0=BE=D1=81=D0=BE=D0=B1=D0=B0=20=D0=BF=D1=80=D0=BE=D1=89=D0=B5?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/User.php | 35 +++++++++++++++++++++++++++-------- inf.php | 29 ++++++++++------------------- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/classes/User.php b/classes/User.php index 09715a8..4662097 100644 --- a/classes/User.php +++ b/classes/User.php @@ -69,10 +69,15 @@ EMPTY_SLOT; { $dressed_item = []; $dressed_items = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->id); - while ($row = $dressed_items->fetch_assoc()) { - $dressed_item[$row['dressed_slot']] = $row; - } - echo '
'; + while ($row = $dressed_items->fetch_assoc()) { + $dressed_item[$row['dressed_slot']] = $row; + } + echo << + + +
+USERINFO; if ($this->align) { echo sprintf('Склонность', $this->align); } @@ -84,7 +89,8 @@ EMPTY_SLOT; if ($this->clan) { echo sprintf('%s', $this->clan, $this->clan); } - echo '
+ echo <<
добавить здоровье
@@ -93,7 +99,8 @@ EMPTY_SLOT; - + + + +
'; + +USERINFO; if (isset($dressed_item[1])) { $this->showItem($dressed_item[1]); } else { @@ -173,9 +180,10 @@ USERINFO; } else { $this->showItem(11); } - echo << - + Имя {$this->login}
Сила {$this->strength}
Ловкость {$this->dexterity}
@@ -184,7 +192,18 @@ USERINFO; Интеллект {$this->intelligence}
Мудрость {$this->wisdom}
Находится в {$this->getRoomName($this->room)}
+
+ Родовой знак +
+ USERINFO; + if ($this->married) { + echo sprintf('В браке с %s', $this->married, $this->married, $this->married); + } + // if (isset($dressed_item[1])) { // $this->showItem($dressed_item[1]); diff --git a/inf.php b/inf.php index 28b8cc1..36d4595 100644 --- a/inf.php +++ b/inf.php @@ -33,7 +33,7 @@ if (empty($user->id)): ?> Ошибка - Ошибка: персонаж не найден... + Ошибка: персонаж не найден...

←назад

@@ -48,24 +48,13 @@ if (empty($user->id)): ?> admin === 1 && private_access($uid) !== ADMINISTRATOR_ACCESS && file_exists('customuserdata/' . $user['id'])) { die(file_get_contents('customuserdata/' . $user['id'])); +} +try { + $user->showUserInfo(); +} catch (Exception $e) { + echo "
Ошибка классового генератора персонажа showUserInfo(): {$e}
"; } ?> - - - - - -
- showUserInfo();} catch (Exception $e) {echo "
Ошибка классового генератора персонажа showUserInfo(): {$e}
";} - if (!empty($user->married)): ?> - - В браке с <?= $user->married ?> - - -
- Родовой знак -
+
Персонаж обезличен!'); } -} catch (Exception $e) {echo "
Ошибка обезличивателя: {$e}
";} +} catch (Exception $e) { + echo "
Ошибка обезличивателя: {$e}
"; +} if (!empty($user->realname)) { echo "Имя: " . $user->realname . "
"; }