Старт переноса showinf_pers(); в класс

This commit is contained in:
lopar
2020-07-04 14:37:36 +03:00
parent a2835046a4
commit 51522165c8
2 changed files with 10 additions and 7 deletions

View File

@@ -45,10 +45,10 @@ class User
public function showUserInfo() {
$dressed_items = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->id);
foreach ($dressed_items->fetch_assoc() as $item) {
echo 1;
}
return <<<USERINFO
// foreach ($dressed_items->fetch_assoc() as $item) {
// echo 1;
// }
echo <<<USERINFO
Имя {$this->login} <br>
Сила {$this->strength} <br>
Ловкость {$this->dexterity} <br>
@@ -56,9 +56,12 @@ class User
Выносливость {$this->endurance} <br>
Интеллект {$this->intelligence} <br>
Мудрость {$this->wisdom} <br>
Находится в {$this->getRoomName($this->room)}
Находится в {$this->getRoomName($this->room)}<br>
Предметы на тушке: <br>
USERINFO;
while (($items = $dressed_items->fetch_assoc()) !== null) {
print_r($items);
}
}
}