fix selling

This commit is contained in:
lopar 2019-01-14 23:54:20 +02:00
parent 40e0da910c
commit fe619c675a
3 changed files with 3 additions and 7 deletions

View File

@ -85,17 +85,14 @@ abstract class Item
public $onlyone;
public $shshop;
/**
* Item constructor.
*
* @param $row
*/
public function __construct($row)
{
foreach ($this as $key => $value) {
// if (!empty($key)) {
// $this->$key = $row[$key];
// } else $this->$key = null;
if (isset($row[$key])) {
$this->$key = $row[$key];
}

View File

@ -4,8 +4,6 @@ class ShopItem extends Item
{
public function printInfo()
{
if ($this->printControls()) $this->maxdur = 0;
parent::printBaseInfo();
parent::printRequirements();
parent::printBonuses();

View File

@ -98,7 +98,8 @@ FROM `shop` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `count` > 0 AND `c
`magic`.`file` AS `magic_file`,
`magic`.`targeted` AS `magic_targeted`,
`magic`.`needcharge` AS `magic_needcharge`,
`magic`.`img` AS `magic_img`
`magic`.`img` AS `magic_img`,
0 AS `maxdur`
FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `dressed` = 0 AND `setsale` = 0 AND `cost` > 0 AND `present` = "?s" AND `tradesale` = 0 AND `podzem` = 0 AND `goden` = 0 AND `owner` = ?i ORDER BY `update` DESC', null, $_SESSION['uid']);