diff --git a/classes/Item.php b/classes/Item.php
index dde06c1..cd7353d 100644
--- a/classes/Item.php
+++ b/classes/Item.php
@@ -8,7 +8,7 @@ abstract class Item
public $maxdur;
public $img;
- public $type;
+ public $type; # эти. что есть что нет...
private $typename;
public $nlevel;
@@ -125,8 +125,21 @@ abstract class Item
$this->mfauvorot = $row['mfauvorot'];
switch ($this->type) {
- case 1: $this->typename = 'Шлем'; break;
- default: $this->typename = 'Нечто';
+ case 1: $this->typename = 'Серьги'; break;
+ case 2: $this->typename = 'Ожерелье'; break;
+ case 3: $this->typename = 'Оружие'; break;
+ case 4: $this->typename = 'Серьги'; break;
+ case 5: $this->typename = 'Кольцо'; break;
+
+ case 8: $this->typename = 'Шлем'; break;
+ case 9: $this->typename = 'Перчатки'; break;
+ case 10: $this->typename = 'Щит'; break;
+ case 11: $this->typename = 'Обувь'; break;
+ case 12: $this->typename = 'Магический свиток'; break;
+ case 22: $this->typename = 'Рубашка'; break;
+ case 50: $this->typename = 'Волшебное зелье'; break;
+ case 200: $this->typename = 'Сувенир'; break;
+ default: $this->typename = 'Хлам';
}
}
diff --git a/test.php b/test.php
index b8897d8..bd5511c 100644
--- a/test.php
+++ b/test.php
@@ -14,9 +14,9 @@ require_once 'config.php';
//print_r($items);
# $items = []; foreach(фетч того ебучего массива as $value) {$items[$value['id']] = $value}
+$iteminfo =[];
$result = db::c()->query('SELECT * FROM `shop` WHERE count > 0');
$result2 = db::c()->query('SELECT * FROM `inventory` WHERE owner = 11263');
-
while ($row = $result->fetch_assoc()) {
$iteminfo[] = new ShopItem($row);
}
@@ -25,7 +25,7 @@ while ($row = $result2->fetch_assoc()) {
$iteminfo[] = new InventoryItem($row);
}
-echo "
Товары магазина | ";
+echo "";
foreach ($iteminfo as $ii) {
echo "";
$ii->printImage();
|