#49: Удаление здания комиссионки.

This commit is contained in:
Igor Barkov (iwork)
2022-01-21 18:17:56 +02:00
parent baf127231e
commit 415d198351
13 changed files with 28 additions and 179 deletions
+6 -2
View File
@@ -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();
}
}