From ac304dacca07d954720a52643587d7a3f9d9e728 Mon Sep 17 00:00:00 2001 From: yangduo Date: Tue, 8 Apr 2025 18:41:36 +0800 Subject: [PATCH] fix --- webapp/controller/ActivityController.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/webapp/controller/ActivityController.class.php b/webapp/controller/ActivityController.class.php index bef9e06..0715f97 100644 --- a/webapp/controller/ActivityController.class.php +++ b/webapp/controller/ActivityController.class.php @@ -1821,8 +1821,9 @@ class ActivityController $onedraw = !isset($_REQUEST['type']) || $_REQUEST['type'] == 0; $cost_strings = $onedraw ? explode(":", $dr["onecost"]) : explode(":", $dr['tencost']); if (sizeof($cost_strings) > 1) { + $costid = $cost_strings[1]; $count = $cost_strings[1]; - if ($cost_strings[0] == 10003) { + if ($costid == 10003) { $row = $conn->execQueryOne( 'SELECT diamond_num, first_gift, free_coin, free_diamond FROM user WHERE accountid=:accountid;', array( @@ -1859,7 +1860,7 @@ class ActivityController 'SELECT num FROM bag WHERE accountid=:accountid AND id=:id;', array( ':accountid' => $account_id, - ':id' => $cost_strings[0] + ':id' => $costid ) ); @@ -1873,7 +1874,7 @@ class ActivityController ' WHERE accountid=:accountid AND id=:id;', array( ':accountid' => $account_id, - 'id' => $id, + ':id' => $costid, ':num' => $row['num'] - $count, ':modify_time' => time() ) @@ -1909,7 +1910,7 @@ class ActivityController return; } - if ($onedraw){ + if ($onedraw) { $item_list = metatable\getDropAllListById($drop_id, $item_list); } else { for ($j = 0; $j < 10; $j++) {