This commit is contained in:
aozhiwei 2020-08-03 14:05:31 +08:00
parent 499ef5db53
commit 938fc2f698

View File

@ -628,7 +628,7 @@ class RoleController{
$rank = $_REQUEST['rank']; $rank = $_REQUEST['rank'];
$ar = $this->getRankReward($rank); $ar = $this->getRankReward($rank);
$coin_num = $ar['zbmode_param']; $coin_num = $ar['zbmode_param'];
$row = $conn->execQueryOne('SELECT newhand, game_times, vip_score, daily_time, coin_num, season_games FROM user WHERE accountid=:accountid;', $row = $conn->execQueryOne('SELECT daily_time, coin_num FROM user WHERE accountid=:accountid;',
array( array(
':accountid' => $account_id ':accountid' => $account_id
)); ));
@ -636,6 +636,7 @@ class RoleController{
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家1'); phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家1');
return; return;
} }
/*
$newhand = $row['newhand']; $newhand = $row['newhand'];
$p1 = $this->getParameter(NEWHAND_NUM1); $p1 = $this->getParameter(NEWHAND_NUM1);
$fight_times = $p1['param_value']; $fight_times = $p1['param_value'];
@ -643,30 +644,27 @@ class RoleController{
$view_times = $p2['param_value']; $view_times = $p2['param_value'];
if ($row['game_times'] + 1 == $fight_times && $row['vip_score'] >= $view_times) { if ($row['game_times'] + 1 == $fight_times && $row['vip_score'] >= $view_times) {
$newhand = 1; $newhand = 1;
} }*/
$nowTime = phpcommon\getdayseconds(time()); $nowTime = phpcommon\getdayseconds(time());
$daily_time = $row['daily_time']; $daily_time = $row['daily_time'];
if ($daily_time == 0 || ($nowTime - phpcommon\getdayseconds($daily_time) > 0)) { if ($daily_time == 0 || ($nowTime - phpcommon\getdayseconds($daily_time) > 0)) {
$daily_time = time(); $daily_time = time();
} }
$ret = $conn->execScript('UPDATE user SET game_times=:game_times, coin_num=:coin_num, modify_time=:modify_time, first_fight=1, season_games=:season_games, newhand=:newhand, daily_time=:daily_time ' . $ret = $conn->execScript('UPDATE user SET coin_num=:coin_num, modify_time=:modify_time, daily_time=:daily_time ' .
'WHERE accountid=:accountid;', 'WHERE accountid=:accountid;',
array( array(
':game_times' => $row['game_times'] + 1,
':accountid' => $account_id, ':accountid' => $account_id,
':coin_num' => $row['coin_num'] + $coin_num, ':coin_num' => $row['coin_num'] + $coin_num,
':modify_time' => time(), ':modify_time' => time(),
':daily_time' => $daily_time, ':daily_time' => $daily_time,
':season_games' => $row['season_games'] + 1,
':newhand' => $newhand,
)); ));
if (!$ret) { if (!$ret) {
die(); die();
return; return;
} }
//刷新任务 //刷新任务
$quest = new classes\Quest(); //$quest = new classes\Quest();
$quest->triggerQuest(QUEST_DAY_FIGHT, 1, 1, $account_id); //$quest->triggerQuest(QUEST_DAY_FIGHT, 1, 1, $account_id);
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,