diff --git a/webapp/controller/EquipController.class.php b/webapp/controller/EquipController.class.php index dd12418..76f4739 100644 --- a/webapp/controller/EquipController.class.php +++ b/webapp/controller/EquipController.class.php @@ -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) { diff --git a/webapp/controller/RoleController.class.php b/webapp/controller/RoleController.class.php index 4b751fb..d86b4b4 100644 --- a/webapp/controller/RoleController.class.php +++ b/webapp/controller/RoleController.class.php @@ -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']; }