This commit is contained in:
aozhiwei 2020-08-24 11:28:50 +08:00
parent 1a5077ca44
commit f892c62a95
2 changed files with 9 additions and 18 deletions

View File

@ -163,13 +163,14 @@ class EquipController{
}
$time_flag = 0;
if ($flag == 0) {
$ret = $conn->execScript('UPDATE equip SET id=:id, lv=0, modify_time=:modify_time ' .
' WHERE accountid=:accountid;',
array(
':accountid' => $account_id,
':modify_time' => time(),
':id' => $id,
));
$ret = $conn->execScript('UPDATE equip SET id=:id, lv=0, modify_time=:modify_time, using_id=:id ' .
' WHERE accountid=:accountid;',
array(
':accountid' => $account_id,
':modify_time' => time(),
':id' => $id,
':using_id' => $id,
));
}
$time = $row['active_time'] + $row['sub_time'];
if (time() >= $time && $row['sub_time'] != 0) {

View File

@ -1346,19 +1346,9 @@ class RoleController{
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
return;
}
$row = $conn->execQueryOne('SELECT using_id FROM equip WHERE accountid=:accountid;',
array(
':accountid' => $account_id,
));
if (!$row) {
phpcommon\sendError(ERR_USER_BASE + 3, '没有这个装备');
return;
}
$id = 0;
$id = 12141;
if (isset($_REQUEST['id'])) {
$id = $row['using_id'];
} else {
$id = $_REQUEST['id'];
}