From 814aa01c07b8ada481488f0a7d4a1ac449d1401a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 16 Aug 2019 10:43:45 +0800 Subject: [PATCH] 1 --- third_party/phpcommon | 2 +- webapp/controller/RoleController.class.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/third_party/phpcommon b/third_party/phpcommon index 2e7067d..0389b4b 160000 --- a/third_party/phpcommon +++ b/third_party/phpcommon @@ -1 +1 @@ -Subproject commit 2e7067d848c09897f27e6486c38399b27126ca26 +Subproject commit 0389b4b5b996ac76334b4ea96c7fac1b2e9db050 diff --git a/webapp/controller/RoleController.class.php b/webapp/controller/RoleController.class.php index 28537a4..5586ef8 100644 --- a/webapp/controller/RoleController.class.php +++ b/webapp/controller/RoleController.class.php @@ -569,8 +569,8 @@ class RoleController{ $item_list = array(); foreach ($weight_array as $item) { if ($item[0] >= Rand(0, 10000)) { - $item_id = $item_id_array[0]; - $item_num = $num_array[0]; + $item_id = $item_id_array[$i][0]; + $item_num = $num_array[$i][0]; $addreward = new classes\AddReward(); $addreward->addReward($item_id, $item_num, $account_id); array_push($item_list, array( @@ -615,7 +615,7 @@ class RoleController{ $p = $this->getParameter(REWARD_TIMES); $times = $p['param_value'] - 1; foreach ($weight_array as $item) { - if ($item[$i][0] >= Rand(0, 10000)) { + if ($item[0] >= Rand(0, 10000)) { $item_id = $item_id_array[$i][0]; $item_num = $num_array[$i][0]; $addreward = new classes\AddReward();