2019-01-11 16:02:57 +00:00
|
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* Created by PhpStorm.
|
|
|
|
|
* User: Lopar
|
|
|
|
|
* Date: 10.01.2019
|
|
|
|
|
* Time: 17:12
|
|
|
|
|
*/
|
|
|
|
|
|
2019-01-11 19:16:39 +00:00
|
|
|
|
abstract class Item
|
2019-01-11 16:02:57 +00:00
|
|
|
|
{
|
|
|
|
|
public $name;
|
|
|
|
|
public $massa;
|
|
|
|
|
public $nalign;
|
|
|
|
|
public $count;
|
|
|
|
|
public $maxdur;
|
|
|
|
|
public $img;
|
|
|
|
|
|
|
|
|
|
public $nlevel;
|
|
|
|
|
public $nsila;
|
|
|
|
|
public $nlovk;
|
|
|
|
|
public $ninta;
|
|
|
|
|
public $nvinos;
|
|
|
|
|
public $nintel;
|
|
|
|
|
public $nmudra;
|
|
|
|
|
public $nnoj;
|
|
|
|
|
public $ntopor;
|
|
|
|
|
public $ndubina;
|
|
|
|
|
public $nmech;
|
|
|
|
|
public $nfire;
|
|
|
|
|
public $nwater;
|
|
|
|
|
public $nair;
|
|
|
|
|
public $nearth;
|
|
|
|
|
public $nlight;
|
|
|
|
|
public $ngray;
|
|
|
|
|
public $ndark;
|
|
|
|
|
|
|
|
|
|
public $minu;
|
|
|
|
|
public $maxu;
|
|
|
|
|
|
|
|
|
|
public $gsila;
|
|
|
|
|
public $glovk;
|
|
|
|
|
public $ginta;
|
|
|
|
|
public $gintel;
|
|
|
|
|
public $gnoj;
|
|
|
|
|
public $gtopor;
|
|
|
|
|
public $gdubina;
|
|
|
|
|
public $gmech;
|
|
|
|
|
public $gfire;
|
|
|
|
|
public $gwater;
|
|
|
|
|
public $gair;
|
|
|
|
|
public $gearth;
|
|
|
|
|
public $glight;
|
|
|
|
|
public $ggray;
|
|
|
|
|
public $gdark;
|
|
|
|
|
public $ghp;
|
|
|
|
|
|
|
|
|
|
public $bron1;
|
|
|
|
|
public $bron2;
|
|
|
|
|
public $bron3;
|
|
|
|
|
public $bron4;
|
|
|
|
|
|
|
|
|
|
public $mfkrit;
|
|
|
|
|
public $mfakrit;
|
|
|
|
|
public $mfuvorot;
|
|
|
|
|
public $mfauvorot;
|
|
|
|
|
|
2019-01-11 16:26:33 +00:00
|
|
|
|
/**
|
|
|
|
|
* Item constructor.
|
|
|
|
|
*
|
|
|
|
|
* @param $row
|
|
|
|
|
*/
|
2019-01-11 16:02:57 +00:00
|
|
|
|
public function __construct($row)
|
|
|
|
|
{
|
|
|
|
|
$this->name = $row['name'];
|
|
|
|
|
$this->massa = $row['massa'];
|
|
|
|
|
$this->count = $row['count'];
|
|
|
|
|
$this->maxdur = $row['maxdur'];
|
|
|
|
|
$this->img = $row['img'];
|
|
|
|
|
|
|
|
|
|
$this->nlevel = $row['nlevel'];
|
|
|
|
|
$this->nalign = $row['nalign'];
|
|
|
|
|
$this->nsila = $row['nsila'];
|
|
|
|
|
$this->nlovk = $row['nlovk'];
|
|
|
|
|
$this->ninta = $row['ninta'];
|
|
|
|
|
$this->nvinos = $row['nvinos'];
|
|
|
|
|
$this->nintel = $row['nintel'];
|
|
|
|
|
$this->nmudra = $row['nmudra'];
|
|
|
|
|
$this->nnoj = $row['nnoj'];
|
|
|
|
|
$this->ntopor = $row['ntopor'];
|
|
|
|
|
$this->ndubina = $row['ndubina'];
|
|
|
|
|
$this->nmech = $row['nmech'];
|
|
|
|
|
$this->nfire = $row['nfire'];
|
|
|
|
|
$this->nwater = $row['nwater'];
|
|
|
|
|
$this->nair = $row['nair'];
|
|
|
|
|
$this->nearth = $row['nearth'];
|
|
|
|
|
$this->nlight = $row['nlight'];
|
|
|
|
|
$this->ngray = $row['ngray'];
|
|
|
|
|
$this->ndark = $row['ndark'];
|
|
|
|
|
|
|
|
|
|
$this->minu = $row['minu'];
|
|
|
|
|
$this->maxu = $row['maxu'];
|
|
|
|
|
|
|
|
|
|
$this->gsila = $row['gsila'];
|
|
|
|
|
$this->glovk = $row['glovk'];
|
|
|
|
|
$this->ginta = $row['ginta'];
|
|
|
|
|
$this->gintel = $row['gintel'];
|
|
|
|
|
$this->gnoj = $row['gnoj'];
|
|
|
|
|
$this->gtopor = $row['gtopor'];
|
|
|
|
|
$this->gdubina = $row['gdubina'];
|
|
|
|
|
$this->gmech = $row['gmech'];
|
|
|
|
|
$this->gfire = $row['gfire'];
|
|
|
|
|
$this->gwater = $row['gwater'];
|
|
|
|
|
$this->gair = $row['gair'];
|
|
|
|
|
$this->gearth = $row['gearth'];
|
|
|
|
|
$this->glight = $row['glight'];
|
|
|
|
|
$this->ggray = $row['ggray'];
|
|
|
|
|
$this->gdark = $row['gdark'];
|
|
|
|
|
$this->ghp = $row['ghp'];
|
|
|
|
|
|
|
|
|
|
$this->bron1 = $row['bron1'];
|
|
|
|
|
$this->bron2 = $row['bron2'];
|
|
|
|
|
$this->bron3 = $row['bron3'];
|
|
|
|
|
$this->bron4 = $row['bron4'];
|
|
|
|
|
|
|
|
|
|
$this->mfkrit = $row['mfkrit'];
|
|
|
|
|
$this->mfakrit = $row['mfakrit'];
|
|
|
|
|
$this->mfuvorot = $row['mfuvorot'];
|
|
|
|
|
$this->mfauvorot = $row['mfauvorot'];
|
|
|
|
|
}
|
2019-01-11 19:39:37 +00:00
|
|
|
|
|
|
|
|
|
public function printImage()
|
|
|
|
|
{
|
|
|
|
|
echo "<img src='/i/sh/{$this->img}'";
|
|
|
|
|
}
|
2019-01-11 19:49:00 +00:00
|
|
|
|
|
|
|
|
|
protected function printBaseInfo()
|
|
|
|
|
{
|
|
|
|
|
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>";
|
|
|
|
|
}
|
2019-01-11 16:02:57 +00:00
|
|
|
|
}
|