diff --git a/classes/Battles/ShopItem.php b/classes/Battles/ShopItem.php index fb37581..84ceefb 100644 --- a/classes/Battles/ShopItem.php +++ b/classes/Battles/ShopItem.php @@ -13,7 +13,6 @@ class ShopItem extends Item private const NO_BARTER_ITEMS = 'У вас нет требуемых предметов!'; private const BUTTON = [ 'setmarket' => 'Сдать в магазин', - 'unsetmarket' => 'Снять с продажи', 'buymarket' => 'Купить с рук', 'sellshop' => 'Продать', 'buyshop' => 'Купить', @@ -252,13 +251,10 @@ SQL; */ public function printControls(): string { - if (!in_array($this->optype, ['setmarket', 'unsetmarket', 'buymarket', 'sellshop', 'buyshop',])) { + if (!in_array($this->optype, ['setmarket', 'buymarket', 'sellshop', 'buyshop',])) { return ''; } $str = $this->optype == 'setmarket' ? '' : ''; - if ($this->optype === 'buymarket' && $this->ownerId === User::$current->getId()) { - $this->optype = 'unsetmarket'; - } $hiddenValue = $this->optype === 'buyshop' ? $this->offerId : $this->item_id; $button_name = self::BUTTON[$this->optype]; return <<