From 938fc2f69817e72e86f7b46e231608b78744b9b6 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 3 Aug 2020 14:05:31 +0800 Subject: [PATCH] 1 --- webapp/controller/RoleController.class.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/webapp/controller/RoleController.class.php b/webapp/controller/RoleController.class.php index 538640c..fa1cf57 100644 --- a/webapp/controller/RoleController.class.php +++ b/webapp/controller/RoleController.class.php @@ -628,7 +628,7 @@ class RoleController{ $rank = $_REQUEST['rank']; $ar = $this->getRankReward($rank); $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( ':accountid' => $account_id )); @@ -636,6 +636,7 @@ class RoleController{ phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家1'); return; } + /* $newhand = $row['newhand']; $p1 = $this->getParameter(NEWHAND_NUM1); $fight_times = $p1['param_value']; @@ -643,30 +644,27 @@ class RoleController{ $view_times = $p2['param_value']; if ($row['game_times'] + 1 == $fight_times && $row['vip_score'] >= $view_times) { $newhand = 1; - } + }*/ $nowTime = phpcommon\getdayseconds(time()); $daily_time = $row['daily_time']; if ($daily_time == 0 || ($nowTime - phpcommon\getdayseconds($daily_time) > 0)) { $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;', array( - ':game_times' => $row['game_times'] + 1, ':accountid' => $account_id, ':coin_num' => $row['coin_num'] + $coin_num, ':modify_time' => time(), ':daily_time' => $daily_time, - ':season_games' => $row['season_games'] + 1, - ':newhand' => $newhand, )); if (!$ret) { die(); return; } //刷新任务 - $quest = new classes\Quest(); - $quest->triggerQuest(QUEST_DAY_FIGHT, 1, 1, $account_id); + //$quest = new classes\Quest(); + //$quest->triggerQuest(QUEST_DAY_FIGHT, 1, 1, $account_id); echo json_encode(array( 'errcode' => 0,