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

This commit is contained in:
lopar
2021-03-11 20:42:36 +02:00
parent 1d2128830f
commit a5d13d7e74
6 changed files with 19 additions and 277 deletions

View File

@@ -487,7 +487,8 @@ if (@$_GET['kill'] && $user['id'] == $user['caveleader'] && $_GET['kill'] != $us
while ($rec = mysql_fetch_assoc($r)) {
$slot = getslot($rec['id'], $usr);
if ($slot) {
dropitemid(0, $v['user'], $slot);
$item = new \Battles\DressedItems($v['user']);
$item->undressItem($slot);
}
}
mysql_query("DELETE FROM `inventory` WHERE `owner` = '$v[user]' AND `foronetrip` = 1");
@@ -898,7 +899,8 @@ if (@$_GET['exit']) {
while ($rec = mysql_fetch_assoc($r)) {
$slot = getslot($rec['id']);
if ($slot) {
dropitemid(0, $user['id'], $slot);
$item = new \Battles\DressedItems($user['id']);
$item->undressItem($slot);
}
}
mysql_query("DELETE FROM `inventory` WHERE `owner` = '$user[id]' AND `foronetrip` = 1");