Перенос и унификация функции снятия предметов в класс DressedItems.
This commit is contained in:
+4
-2
@@ -142,7 +142,8 @@ if (isset($_POST['exit'])) {
|
||||
}
|
||||
$dresed = mysql_query('SELECT `id`, `type` FROM `inventory` WHERE `dressed` = 1 AND `laba` = 2 AND `owner` = "' . $user['id'] . '"');
|
||||
while ($pl = mysql_fetch_array($dresed)) {
|
||||
dropitemid($pl['type'], $user['id']);
|
||||
$item = new \Battles\DressedItems($user['id']);
|
||||
$item->undressItem($pl['type']);
|
||||
}
|
||||
mysql_query('DELETE FROM `inventory` WHERE `laba` > 0 AND `owner` = "' . $user['id'] . '"');
|
||||
mysql_query("UPDATE `users`, `online` SET `users`.`room` = '1051', `online`.`room` = '1051', `users`.`x` = '0', `users`.`y` = '0', `users`.`laba` = '0' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '" . $user['id'] . "'");
|
||||
@@ -291,7 +292,8 @@ if ($user['y'] >= count($map_d) - 2) {
|
||||
}
|
||||
$dresed = mysql_query('SELECT `id`, `type` FROM `inventory` WHERE `dressed` = 1 AND `laba` = 2 AND `owner` = "' . $user['id'] . '"');
|
||||
while ($pl = mysql_fetch_array($dresed)) {
|
||||
dropitemid($pl['type'], $user['id']);
|
||||
$item = new \Battles\DressedItems($user['id']);
|
||||
$item->undressItem($pl['type']);
|
||||
}
|
||||
mysql_query('UPDATE `inventory` SET `laba` = 0 WHERE `laba` = 1 AND `owner` = "' . $user['id'] . '"');
|
||||
mysql_query('DELETE FROM `inventory` WHERE `laba` = 2 AND `owner` = "' . $user['id'] . '"');
|
||||
|
||||
Reference in New Issue
Block a user