$value) {
if (!empty($key)) {
$this->$key = $row[$key];
} else $this->$key = null;
}
// ТА ЛААААДНО?!
// $this->name = $row['name'];
// $this->massa = $row['massa'];
// $this->maxdur = $row['maxdur'];
// $this->img = $row['img'];
//
// $this->type = $row['type'];
//
// $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'];
switch ($this->type) {
case 1:
$this->typename = 'Серьги';
break;
case 2:
$this->typename = 'Ожерелье';
break;
case 3:
$this->typename = 'Оружие';
break;
case 4:
$this->typename = 'Броня';
break;
case 5:
$this->typename = 'Кольцо';
break;
case 8:
$this->typename = 'Шлем';
break;
case 9:
$this->typename = 'Перчатки';
break;
case 10:
$this->typename = 'Щит';
break;
case 11:
$this->typename = 'Обувь';
break;
case 12:
$this->typename = 'Магический свиток';
break;
case 22:
$this->typename = 'Рубашка';
break;
case 50:
$this->typename = 'Волшебное зелье';
break;
case 200:
$this->typename = 'Сувенир';
break;
default:
$this->typename = 'Хлам';
}
}
abstract public function printInfo();
public function printImage()
{
echo <<
IMG;
}
protected function wrap($number)
{
if ($number > 0) return ": " . $number . "";
else return ": " . $number . "";
}
protected function printBaseInfo()
{
echo "" . $this->name . " (Масса: " . $this->massa . ")";
if ($this->nalign) echo " nalign}.gif title='Этот предмет могут использовать только игроки с определённой склонностью.'> ";
if ($this->maxdur > 0) echo "
Долговечность: {$this->maxdur}";
if ($this->maxdur == -1) echo "
Долговечность: неразрушимо";
echo "
{$this->typename}";
}
protected function printRequirements()
{
echo "