make Item abstract

This commit is contained in:
lopar
2019-01-11 21:16:39 +02:00
parent b6f9621c13
commit 6c7f997257
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -14,14 +14,14 @@ class ItemClass extends Item
else return ": <b style='color: maroon;'>" . $number . "</b>";
}
public function printItemStats()
public function printStats()
{
echo $this->name . " (Масса: " . $this->massa . ")";
if ($this->nalign) echo " <img src=i/align_{$this->nalign}.gif title='Этот предмет могут использовать только игроки с определённой склонностью.'> ";
if ($this->count > 0) echo "<br><small>(Осталось: {$this->count} штук)</small>";
if ($this->maxdur > 0) echo "<br>Долговечность: {$this->maxdur}";
if ($this->maxdur == -1) echo "<br>Долговечность: <i>неразрушимо</i>";
echo "<br>";
if ($this->nlevel > 0) echo "<br>Требуется уровень" . $this->wrap($this->nlevel);
if ($this->nnoj > 0) echo "<br>Требуется владение колющим оружиием" . $this->wrap($this->nnoj);
if ($this->ndubina > 0) echo "<br>Требуется владение дробящим оружием" . $this->wrap($this->ndubina);
@@ -47,7 +47,7 @@ class ItemClass extends Item
echo "<br>";
}
public function printItemImage()
public function printImage()
{
echo "<img src='/i/sh/{$this->img}'";
}