make class greater

This commit is contained in:
Igor Barkov [iwork] 2019-01-14 16:31:42 +02:00
parent fa74a5a5b7
commit 77081db3a7

View File

@ -2,14 +2,19 @@
abstract class Item
{
public $id;
public $name;
public $massa;
public $nalign;
public $massa;
public $duration;
public $maxdur;
public $img;
public $count;
public $razdel;
public $cost;
public $ecost;
public $type; # эти. что есть что нет...
private $typename;
public $nlevel;
public $nsila;
@ -60,9 +65,23 @@ abstract class Item
public $mfuvorot;
public $mfauvorot;
public $shshop;
public $dategoden;
public $goden;
public $needident;
public $magic;
public $magic_name;
public $magic_img;
public $letter;
public $isrep;
public $gmp;
public $gmeshok;
public $zeton;
public $encicl;
public $onlyone;
public $koll;
public $prof;
public $prof1;
/**
* Item constructor.
@ -72,9 +91,9 @@ abstract class Item
public function __construct($row)
{
foreach ($this as $key => $value) {
if (!empty($key)) {
$this->$key = $row[$key];
}
}
// ТА ЛААААДНО?!
@ -246,11 +265,11 @@ IMG;
protected function printMagic()
{
if ($this->magic) {
if ($this->magic AND $this->type != 12) {
echo "<br>Магические свойства:";
if ($this->magic_name) echo "<br><i style='color: dimgray;'>{$this->magic_name}</i>";
else echo "<br><i style='color: dimgray;'>Неопознанная магия</i>";
if ($this->magic_img) echo <<<IMG
if ($this->magic_img AND $this->type != 50) echo <<<IMG
<br><img src="//{$_SERVER['SERVER_NAME']}/i/sh/{$this->magic_img}" class="item-wrap-normal">
IMG;
}