Show present info in inventory class
This commit is contained in:
parent
911a5c0cf6
commit
ceee28678c
@ -2,11 +2,20 @@
|
|||||||
|
|
||||||
class InventoryItem extends Item
|
class InventoryItem extends Item
|
||||||
{
|
{
|
||||||
|
private $present;
|
||||||
|
|
||||||
|
public function __construct($row)
|
||||||
|
{
|
||||||
|
parent::__construct($row);
|
||||||
|
$this->present = $row['present'];
|
||||||
|
}
|
||||||
|
|
||||||
public function printInfo()
|
public function printInfo()
|
||||||
{
|
{
|
||||||
parent::printBaseInfo();
|
parent::printBaseInfo();
|
||||||
parent::printRequirements();
|
parent::printRequirements();
|
||||||
parent::printBonuses();
|
parent::printBonuses();
|
||||||
|
if ($this->present) echo "<p style='color: maroon; font-style: italic'>Этот предмет вам подарил {$this->present}. Вы не можете передать его кому-либо.</p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function printImage()
|
public function printImage()
|
||||||
|
Loading…
Reference in New Issue
Block a user