типизация предмета
This commit is contained in:
parent
616248aeed
commit
eabd08d80d
@ -122,6 +122,11 @@ abstract class Item
|
|||||||
$this->mfakrit = $row['mfakrit'];
|
$this->mfakrit = $row['mfakrit'];
|
||||||
$this->mfuvorot = $row['mfuvorot'];
|
$this->mfuvorot = $row['mfuvorot'];
|
||||||
$this->mfauvorot = $row['mfauvorot'];
|
$this->mfauvorot = $row['mfauvorot'];
|
||||||
|
|
||||||
|
switch ($this->type) {
|
||||||
|
case 1: $this->typename = 'Шлем'; break;
|
||||||
|
default: $this->typename = '<i style="color: maroon;">Нечто</i>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function printImage()
|
public function printImage()
|
||||||
@ -141,7 +146,7 @@ abstract class Item
|
|||||||
if ($this->nalign) echo " <img src=i/align_{$this->nalign}.gif title='Этот предмет могут использовать только игроки с определённой склонностью.'> ";
|
if ($this->nalign) echo " <img src=i/align_{$this->nalign}.gif title='Этот предмет могут использовать только игроки с определённой склонностью.'> ";
|
||||||
if ($this->maxdur > 0) echo "<br>Долговечность: {$this->maxdur}";
|
if ($this->maxdur > 0) echo "<br>Долговечность: {$this->maxdur}";
|
||||||
if ($this->maxdur == -1) echo "<br>Долговечность: <i>неразрушимо</i>";
|
if ($this->maxdur == -1) echo "<br>Долговечность: <i>неразрушимо</i>";
|
||||||
echo "<br>Тип → {$this->type}";
|
echo "<br>{$this->typename}";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function printRequirements()
|
protected function printRequirements()
|
||||||
|
Loading…
Reference in New Issue
Block a user