diff --git a/classes/InventoryItem.php b/classes/InventoryItem.php index 640a790..3ff9f6a 100644 --- a/classes/InventoryItem.php +++ b/classes/InventoryItem.php @@ -2,11 +2,20 @@ class InventoryItem extends Item { + private $present; + + public function __construct($row) + { + parent::__construct($row); + $this->present = $row['present']; + } + public function printInfo() { parent::printBaseInfo(); parent::printRequirements(); parent::printBonuses(); + if ($this->present) echo "

Этот предмет вам подарил {$this->present}. Вы не можете передать его кому-либо.

"; } public function printImage()