diff --git a/classes/User.php b/classes/User.php index 0ac9882..2813e2b 100644 --- a/classes/User.php +++ b/classes/User.php @@ -46,14 +46,23 @@ class User protected function showItem(array $item) { - if ($item) { - echo sprintf('%s', $item['image'], $item['name']); + $itemSlot = $item['dressed_slot'] ?? 0; + $itemName = $item['name'] ?? ''; + $itemImage = $item['image'] ?? ''; + if ($itemSlot) { + echo << +{$itemName} +SLOT; } else { - echo ""; + echo << + align): ?> + + + block): ?> + {$this->login} + + {$this->login} + + clan): ?> + + + + + добавить здоровье 🤔 + + + + + + + + {$this->showItem($dressed_item[1])} + + + + + {$this->showItem($dressed_item[2])} + + + + + {$this->showItem($dressed_item[3])} + + + + + {$this->showItem($dressed_item[4])} + + + + + + + + + + + + {$this->showItem($dressed_item[5])} + + + + + {$this->showItem($dressed_item[6])} + + + + + {$this->showItem($dressed_item[7])} + + + + + {$this->showItem($dressed_item[8])} + + + + + + + + {$this->showItem($dressed_item[9])} + {$this->showItem($dressed_item[10])} + {$this->showItem($dressed_item[11])} + + Имя {$this->login} Сила {$this->strength} Ловкость {$this->dexterity} @@ -69,7 +155,6 @@ class User Интеллект {$this->intelligence} Мудрость {$this->wisdom} Находится в {$this->getRoomName($this->room)} -Предметы на тушке: USERINFO; // if (isset($dressed_item[1])) { diff --git a/views/user-info-doll.php b/views/user-info-doll.php index c963b9f..56ecd60 100644 --- a/views/user-info-doll.php +++ b/views/user-info-doll.php @@ -1,3 +1,21 @@ + +{$dressed_item[$slot]['name']} +SLOT; + } else { + echo << align)): ?> @@ -11,7 +29,7 @@ - + добавить здоровье 🤔 @@ -20,50 +38,22 @@ - - - - = $dressed_item[1]['name'] ?> - - - " class="item-wrap-normal tip" alt="Слот [2]"> - - = $dressed_item[2]['name'] ?> - - - - + = showItemInSlot(2) ?> - - - - = $dressed_item[3]['name'] ?> - - - - + = showItemInSlot(3) ?> - - - - = $dressed_item[4]['name'] ?> - - - - + = showItemInSlot(4) ?> @@ -75,50 +65,22 @@ - - - - = $dressed_item[5]['name'] ?> - - - " class="item-wrap-normal tip" alt="Слот [6]"> - - = $dressed_item[6]['name'] ?> - - - - + = showItemInSlot(6) ?> - - - - = $dressed_item[7]['name'] ?> - - - - + = showItemInSlot(7) ?> - - - - = $dressed_item[8]['name'] ?> - - - - + = showItemInSlot(8) ?> @@ -126,28 +88,7 @@ - - - - = $dressed_item[9]['name'] ?> - - - - - - - - = $dressed_item[10]['name'] ?> - - - - - - - - = $dressed_item[11]['name'] ?> - - - - + = showItemInSlot(9) ?> + = showItemInSlot(10) ?> + = showItemInSlot(11) ?> \ No newline at end of file