magic implement

This commit is contained in:
lopar 2019-01-14 09:58:28 +02:00
parent 2ffd272f48
commit 55041adb6f
1 changed files with 8 additions and 0 deletions

View File

@ -5,6 +5,7 @@ class InventoryItem extends Item
private $present;
private $artefact;
private $item_id;
private $magic;
public function __construct($row)
{
@ -12,6 +13,7 @@ class InventoryItem extends Item
$this->present = $row['present'];
$this->artefact = $row['artefact'];
$this->item_id = $row['id'];
$this->magic = $row['magic'];
if ($this->artefact) $this->name = <<<NAME
<b style='color: crimson;'>{$this->name}</b> <img src="//{$_SERVER['SERVER_NAME']}/i/artefact1.gif">
@ -46,4 +48,10 @@ NAME;
onclick="location='/admin.php'">
BTN;
}
private function ShowMagicInfo($id)
{
$row = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i',$id)->fetch_assoc();
$this->magicname = $row['name'];
}
}