Основные классы переехали на обёртку PDO. Плановое №16.

This commit is contained in:
lopar
2021-01-28 23:05:34 +02:00
parent 0099c235a7
commit 8402912098
22 changed files with 284 additions and 1940 deletions
+7 -3
View File
@@ -38,8 +38,9 @@ abstract class Item
public const ITEM_TYPE_RING = 9;
public const ITEM_TYPE_AMULET = 10;
public const ITEM_TYPE_CONSUMABLE = 20;
const ITEM_TYPE_OTHER = 50;
const ITEM_TYPE_TRASH = 100;
public const ITEM_TYPE_OTHER = 50;
public const ITEM_TYPE_TRASH = 100;
private $typename;
/**
* Item constructor.
@@ -102,7 +103,7 @@ abstract class Item
IMG;
}
protected function wrap($number)
protected function wrap(int $number):string
{
if ($number > 0) {
return ": <b>" . $number . "</b>";
@@ -113,6 +114,9 @@ IMG;
protected function printAllInfo()
{
$lines = [
"Долговечность" => $this->durability,
];
echo "<b>" . $this->name . "</b> (Масса: " . $this->weight . ")";
if ($this->durability) {
echo "<br> Долговечность: " . $this->durability;