diff --git a/webapp/classes/AddReward.php b/webapp/classes/AddReward.php index 25a9f51..c25eba0 100644 --- a/webapp/classes/AddReward.php +++ b/webapp/classes/AddReward.php @@ -423,7 +423,7 @@ class AddReward { phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家'); die(); } - $status = 2; + $status = 1; $active_time = $time * 3600 + time(); $row = $conn->execQueryOne('SELECT * FROM bag WHERE accountid=:accountid AND id=:id;', array( @@ -474,7 +474,9 @@ class AddReward { if ($row['active_time'] < time() + $time * 3600) { $nowTime = time() + $time * 3600; } - $status = 1; + if ($status == 2) { + $status = 1; + } } if ($t == 0) { $status = $this->getStatus($item_id, $status,$accountid); @@ -528,7 +530,7 @@ class AddReward { ':accountid' => $accountid, ':id' => $id, )); - if ($row['status'] != 0 || !$row) { + if (!$row || $row['status'] != 0) { continue; } $flag = 1;