Перенос и унификация функции снятия предметов в класс DressedItems.

This commit is contained in:
lopar
2021-03-11 20:42:36 +02:00
parent 1d2128830f
commit ac3a6ab4d2
6 changed files with 21 additions and 278 deletions
+4 -3
View File
@@ -37,10 +37,11 @@ if (isset($_SESSION['player_id'])) {
if ($del) {
$itemdel = db::c()->query('SELECT item_type, dressed_slot FROM inventory WHERE id=?i', $del)->fetch_assoc();
if ($itemdel['dressed_slot'] == 1) {
dropitem($itemdel['item_type']);
$item = new \Battles\DressedItems($del);
$item->undressItem($itemdel['item_type']);
if ($itemdel['item_type'] == 5) {
dropitem(6);
dropitem(7);
$item->undressItem(6);
$item->undressItem(7);
}
}
db::c()->query('DELETE FROM `inventory` WHERE `id` = ?i', $del);