make class greater

This commit is contained in:
Igor Barkov [iwork] 2019-01-14 18:01:58 +02:00
parent 30001db92b
commit 9095cd0af6
1 changed files with 12 additions and 14 deletions

View File

@ -89,7 +89,7 @@ abstract class Item
foreach ($this as $key => $value) { foreach ($this as $key => $value) {
if (!empty($key)) { if (!empty($key)) {
$this->$key = $row[$key]; $this->$key = $row[$key];
} else $this->$key = null; } else $this->$key = null;
} }
@ -223,19 +223,17 @@ IMG;
protected function printRequirements() protected function printRequirements()
{ {
if (!empty($this->$modifier)) { if ($this->nlevel > 0) echo "<br>Требуется уровень" . $this->wrap($this->nlevel);
if (in_array($modifier,['nlevel','nnoj'])) echo "<br> Требования:"; if ($this->nnoj > 0) echo "<br>Требуется владение колющим оружиием" . $this->wrap($this->nnoj);
if ($this->nlevel > 0) echo "<br>Требуется уровень" . $this->wrap($this->nlevel); if ($this->ndubina > 0) echo "<br>Требуется владение дробящим оружием" . $this->wrap($this->ndubina);
if ($this->nnoj > 0) echo "<br>Требуется владение колющим оружиием" . $this->wrap($this->nnoj); if ($this->ntopor > 0) echo "<br>Требуется владение рубящим оружием" . $this->wrap($this->ntopor);
if ($this->ndubina > 0) echo "<br>Требуется владение дробящим оружием" . $this->wrap($this->ndubina); if ($this->nmech > 0) echo "<br>Требуется владение режущим оружием" . $this->wrap($this->nmech);
if ($this->ntopor > 0) echo "<br>Требуется владение рубящим оружием" . $this->wrap($this->ntopor); if ($this->nsila > 0) echo "<br>Требуется сила" . $this->wrap($this->nsila);
if ($this->nmech > 0) echo "<br>Требуется владение режущим оружием" . $this->wrap($this->nmech); if ($this->nlovk > 0) echo "<br>Требуется ловкость" . $this->wrap($this->nlovk);
if ($this->nsila > 0) echo "<br>Требуется сила" . $this->wrap($this->nsila); if ($this->ninta > 0) echo "<br>Требуется интуиция" . $this->wrap($this->ninta);
if ($this->nlovk > 0) echo "<br>Требуется ловкость" . $this->wrap($this->nlovk); if ($this->nvinos > 0) echo "<br>Требуется выносливость" . $this->wrap($this->nvinos);
if ($this->ninta > 0) echo "<br>Требуется интуиция" . $this->wrap($this->ninta); if ($this->nintel > 0) echo "<br>Требуется интеллект" . $this->wrap($this->nintel);
if ($this->nvinos > 0) echo "<br>Требуется выносливость" . $this->wrap($this->nvinos);
if ($this->nintel > 0) echo "<br>Требуется интеллект" . $this->wrap($this->nintel);
}
} }
protected function printBonuses() protected function printBonuses()