Переделка класса Item под новую базу.
This commit is contained in:
@@ -8,28 +8,25 @@ class InventoryItem extends Item
|
||||
{
|
||||
parent::__construct($row);
|
||||
$this->present = $row['present'];
|
||||
|
||||
if ($this->artefact) $this->name = <<<NAME
|
||||
<b style='color: crimson;'>{$this->name}</b> <img src="//{$_SERVER['SERVER_NAME']}/i/artefact1.gif">
|
||||
NAME;
|
||||
}
|
||||
|
||||
public function printInfo()
|
||||
{
|
||||
parent::printBaseInfo();
|
||||
parent::printRequirements();
|
||||
parent::printBonuses();
|
||||
if ($this->present) echo "<p style='color: maroon; font-style: italic'>Это подарок от {$this->present}. Вы не можете передать его кому-либо ещё.</p>";
|
||||
parent::printAllInfo();
|
||||
if ($this->present) {
|
||||
echo "<p style='color: maroon; font-style: italic'>Это подарок от {$this->present}. Вы не можете передать его кому-либо ещё.</p>";
|
||||
}
|
||||
}
|
||||
|
||||
public function printImage()
|
||||
{
|
||||
if (!in_array($this->type,[12,50,200])) {
|
||||
echo "<a href=//{$_SERVER['SERVER_NAME']}/main.php?edit=1&dress={$this->id} title='Надеть'>";
|
||||
if (!in_array($this->item_type, [12, 50, 200])) {
|
||||
echo "<a href=//{$_SERVER['SERVER_NAME']}/main.php?edit=1&dress={$this->item_id} title='Надеть'>";
|
||||
parent::printImage();
|
||||
echo "</a>";
|
||||
} else {
|
||||
parent::printImage();
|
||||
}
|
||||
else parent::printImage();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -45,6 +42,6 @@ BTN;
|
||||
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
return $this->item_id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user