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

This commit is contained in:
lopar
2021-03-11 20:58:38 +02:00
parent 3f22c6664a
commit c54b97681b
12 changed files with 24 additions and 25 deletions
+1 -6
View File
@@ -109,7 +109,7 @@ $var_map = [
function get_out($u)
{
$pers = db::c()->query('SELECT * FROM users WHERE id = ?i', $u)->fetch_assoc_array();
undressall($pers['id']);
\Battles\DressedItems::undressAllItems($pers['id']);
db::c()->query('UPDATE inventory SET owner = ?i WHERE owner = ?i', $pers['id'], $pers['id'] + _BOTSEPARATOR_);
###
$row = db::c()->query('SELECT * FROM `effects` WHERE `owner` = ?i', $pers['id'] + _BOTSEPARATOR_);
@@ -449,11 +449,6 @@ function addActions($time, $vars, $vls, $uid)
return $ins;
}
function undressall($user_id)
{
db::c()->query('UPDATE inventory SET dressed_slot = 0 WHERE dressed_slot BETWEEN 1 AND 12 AND owner_id = ?i', $user_id);
}
#15
function ref_drop()
{