fix selling
This commit is contained in:
parent
40e0da910c
commit
fe619c675a
@ -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];
|
||||
}
|
||||
|
@ -4,8 +4,6 @@ class ShopItem extends Item
|
||||
{
|
||||
public function printInfo()
|
||||
{
|
||||
if ($this->printControls()) $this->maxdur = 0;
|
||||
|
||||
parent::printBaseInfo();
|
||||
parent::printRequirements();
|
||||
parent::printBonuses();
|
||||
|
3
shop.php
3
shop.php
@ -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']);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user