Show present info in inventory class

This commit is contained in:
lopar 2019-01-12 11:47:23 +02:00
parent 911a5c0cf6
commit ceee28678c

View File

@ -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 "<p style='color: maroon; font-style: italic'>Этот предмет вам подарил {$this->present}. Вы не можете передать его кому-либо.</p>";
}
public function printImage()