This commit is contained in:
wangwei01 2019-06-25 10:59:52 +08:00
parent f1a6cd536d
commit b36fabac19
2 changed files with 5 additions and 11 deletions

View File

@ -151,12 +151,9 @@ class HangController{
$g_conf_reward_cluster = require('../res/rewardTimes@rewardTimes.php'); $g_conf_reward_cluster = require('../res/rewardTimes@rewardTimes.php');
$times = 1; $times = 1;
$reward_conf = array(); $reward_conf = array();
for ($i = 0; $i <= count($g_conf_reward_cluster); $i++) { for ($i = 0; $i < 4; $i++) {
$reward_id = $g_conf_reward_cluster[$i + 91000]['id']; $reward_id = $i + 91000;
$reward_conf = getRewardTimesConfig($g_conf_reward_cluster, $reward_id); $reward_conf = getRewardTimesConfig($g_conf_reward_cluster, $reward_id);
if ($reward_conf['typeId'] != 1) {
continue;
}
if ((int)$coin_num >= $reward_conf['minGold'] && (int)$coin_num <= $reward_conf['maxGold']) { if ((int)$coin_num >= $reward_conf['minGold'] && (int)$coin_num <= $reward_conf['maxGold']) {
$times = $reward_conf['times']; $times = $reward_conf['times'];
break; break;

View File

@ -419,7 +419,7 @@ class RoleController{
return; return;
} }
$coin_num = $row['coin']; $coin_num = $row['coin'];
$times = $this->getRewardTimes($num); $times = $this->getRewardTimes($coin_num);
$coin_num = $row['coin'] * ($times - 1); $coin_num = $row['coin'] * ($times - 1);
$rowUser = $conn->execQueryOne('SELECT * FROM user WHERE accountid=:accountid;', $rowUser = $conn->execQueryOne('SELECT * FROM user WHERE accountid=:accountid;',
array( array(
@ -447,12 +447,9 @@ class RoleController{
$g_conf_reward_cluster = require('../res/rewardTimes@rewardTimes.php'); $g_conf_reward_cluster = require('../res/rewardTimes@rewardTimes.php');
$times = 1; $times = 1;
$reward_conf = array(); $reward_conf = array();
for ($i = 0; $i <= count($g_conf_reward_cluster); $i++) { for ($i = 0; $i < 4; $i++) {
$reward_id = $g_conf_reward_cluster[$i + 91100]['id']; $reward_id = $i + 91100;
$reward_conf = getRewardTimesConfig($g_conf_reward_cluster, $reward_id); $reward_conf = getRewardTimesConfig($g_conf_reward_cluster, $reward_id);
if ($reward_conf['typeId'] != 1) {
continue;
}
if ((int)$coin_num >= $reward_conf['minGold'] && (int)$coin_num <= $reward_conf['maxGold']) { if ((int)$coin_num >= $reward_conf['minGold'] && (int)$coin_num <= $reward_conf['maxGold']) {
$times = $reward_conf['times']; $times = $reward_conf['times'];
break; break;