Зимние правки. MVC/

Signed-off-by: lopar <lopar.4ever@gmail.com>
This commit is contained in:
lopar
2022-08-09 22:57:43 +03:00
parent 0f62ee20e7
commit b9b4c01cf0
104 changed files with 2254 additions and 2086 deletions
+2 -1
View File
@@ -8,6 +8,7 @@
namespace Battles;
use Battles\Database\Db;
use Battles\Models\Inventory;
use stdClass;
class DressedItems
@@ -51,7 +52,7 @@ class DressedItems
self::getItemsInSlots();
// Проверяем, что используется один из 12 слотов и наличие предмета в слоте.
if (in_array($slot_id, Item::ITEM_TYPES_ALLOWED_IN_SLOTS) && $this->dressedItem->$slot_id) {
self::$db->execute('UPDATE inventory SET dressed_slot = 0 WHERE dressed_slot = ? AND owner_id = ?', [$slot_id, $this->USERID]);
Inventory::undressOne($slot_id, $this->USERID);
}
}
public static function undressAllItems($user_id)