#49: Удаление здания комиссионки.
This commit is contained in:
@@ -42,8 +42,12 @@ class Shop
|
||||
$stmt = DBPDO::$db->ofetchall('select * from inventory where on_sale = 0 and dressed_slot = 0 and durability > 0 and owner_id = ?', User::$current->getId());
|
||||
|
||||
$iteminfo = [];
|
||||
$operationType = 'sellshop';
|
||||
if ($this->categoryType === self::BARTER_SHOP) {
|
||||
$operationType = 'setmarket';
|
||||
}
|
||||
foreach ($stmt as $item) {
|
||||
$iteminfo[] = new ShopItem($item, 'sellshop');
|
||||
$iteminfo[] = new ShopItem($item, $operationType);
|
||||
}
|
||||
return $this->strFromArr($iteminfo);
|
||||
}
|
||||
@@ -81,6 +85,6 @@ class Shop
|
||||
|
||||
public function getItemsList(): string
|
||||
{
|
||||
return $this->categoryType !== self::CATEGORY_SALE_ITEMS ? $this->showGoods() : $this->showUserSellItems();
|
||||
return $this->categoryType !== self::CATEGORY_SALE_ITEMS || $this->categoryType !== self::BARTER_SHOP ? $this->showGoods() : $this->showUserSellItems();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user