diff --git a/sql/gamedb.sql b/sql/gamedb.sql index aa86754..e74bc76 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -229,7 +229,6 @@ CREATE TABLE `history_record`( `kills` int(11) NOT NULL COMMENT '游戏击杀', `harms` int(11) NOT NULL COMMENT '游戏伤害', `hurts` int(11) NOT NULL COMMENT '承受伤害', - `alive_time` int(11) NOT NULL COMMENT '游戏生存时间', `coin` bigint NOT NULL COMMENT '战斗结算金币', `status` int(11) NOT NULL COMMENT '结算金币领取状态', `create_time` int(11) NOT NULL COMMENT '创建时间', diff --git a/webapp/controller/HangController.class.php b/webapp/controller/HangController.class.php index e66d210..b366f7a 100644 --- a/webapp/controller/HangController.class.php +++ b/webapp/controller/HangController.class.php @@ -68,7 +68,6 @@ class HangController{ if ((time() - $row['hang_time']) >= $p_time_limit['param_value']) { $num = floor($p_time_limit['param_value'] / 5 * $p_num['param_value']); } - $num = $num; $addreward = new classes\AddReward(); $addreward->addReward($item_id, $num, $account_id); $addreward->updateReward($item_id, $num, $account_id); diff --git a/webapp/controller/RoleController.class.php b/webapp/controller/RoleController.class.php index 838f1eb..5cd3340 100644 --- a/webapp/controller/RoleController.class.php +++ b/webapp/controller/RoleController.class.php @@ -51,9 +51,9 @@ class RoleController{ $para_meta_table = require('../res/parameter@parameter.php'); $para_meta = getParameterConfig($para_meta_table, $para_id); $p = array( - 'id' => $para_conf['id'], - 'param_name' => $para_conf['param_name'], - 'param_value' => $para_conf['param_value'], + 'id' => $para_meta['id'], + 'param_name' => $para_meta['param_name'], + 'param_value' => $para_meta['param_value'], ); return $p; } @@ -139,6 +139,7 @@ class RoleController{ public function battleReport() { + error_log(json_encode($_REQUEST)); $account_id = $_REQUEST['account_id']; //账号 $conn = $this->getMysql($account_id); if (!$conn) { @@ -158,7 +159,6 @@ class RoleController{ $tank1_kill = $_REQUEST['tank1_kill']; //坦克1击杀数 $tank2_kill = $_REQUEST['tank2_kill']; //坦克2击杀数 $tank3_kill = $_REQUEST['tank3_kill'];//坦克3击杀数 - $rescue_member = $_REQUEST['rescue_member']; //救起队友次数 $kill_his = $kills; $harm_his = $harm; $coin_num = $_REQUEST['coin_num']; //金币 @@ -176,6 +176,7 @@ class RoleController{ ':accountid' => $account_id )); if (!$row) { + error_log($row); phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家1'); return; } @@ -188,7 +189,8 @@ class RoleController{ if ($rank == 1) { $row['win_times']++; } - $ret = $conn->execScript('UPDATE user SET game_times=:game_times, win_times=:win_times, kills=:kills, harm=:harm, add_HP=:add_HP, kill_his=:kill_his, harm_his=:harm_his, score=:score, coin_num=:coin_num, modify_time=:modify_time, first_fight=1 ' . + error_log(33333333); + $ret = $conn->execScript('UPDATE user SET game_times=:game_times, win_times=:win_times, kills=:kills, harm=:harm, kill_his=:kill_his, harm_his=:harm_his, score=:score, coin_num=:coin_num, modify_time=:modify_time, first_fight=1 ' . ' WHERE accountid=:accountid;', array( ':game_times' => $row['game_times'] + 1, @@ -197,7 +199,6 @@ class RoleController{ ':kills' => $row['kills'] + $kills, ':harm_his' => $harm_his, ':harm' => $row['harm'] + $harm, - ':add_HP' => $row['add_HP'] + $add_HP, ':accountid' => $account_id, ':coin_num' => $row['coin_num'] + $coin_num, ':score' => $row['score'] + $score, @@ -210,7 +211,7 @@ class RoleController{ //插入历史记录 $ret = $conn->execScript('INSERT INTO history_record(accountid, room_uuid, map_id, map_tpl_name, map_name, game_time, rank, kills, harms, hurts, coin, status, create_time, modify_time) ' . - ' VALUES(:accountid, :room_uuid, :map_id, :map_tpl_name, :map_name, :game_time, :rank, :kills, :harms, :hurts, :alive_time, :coin, 0, :create_time, :modify_time) ' . + ' VALUES(:accountid, :room_uuid, :map_id, :map_tpl_name, :map_name, :game_time, :rank, :kills, :harms, :hurts, :coin, 0, :create_time, :modify_time) ' . ' ON DUPLICATE KEY UPDATE accountid=:accountid, room_uuid=:room_uuid, map_id=:map_id, map_tpl_name=:map_tpl_name, map_name=:map_name, game_time=:game_time, rank=:rank, kills=:kills, harms=:harms, hurts=:hurts, coin=:coin, status=0, modify_time=:modify_time;', array( ':accountid' => $account_id, @@ -231,14 +232,15 @@ class RoleController{ die(); return; } + error_log(222222); //刷新任务 $quest = new classes\Quest(); $quest->triggerQuest(QUEST_DAY_FIGHT, 1, 1, $account_id); - $quest->triggerQuest(QUEST_DAY_ALIVE, 1, (int)($alive_time / 1000 / 60), $account_id); + $quest->triggerQuest(QUEST_DAY_ALIVE, 1, $skill, $account_id); $quest->triggerQuest(QUEST_DAY_HARM, 1, $harm, $account_id); $quest->triggerQuest(QUEST_DAY_KILL, 1, $kills, $account_id); $quest->triggerQuest(QUEST_SUM_FIGHT, 2, 1, $account_id); - $quest->triggerQuest(QUEST_SUM_ALIVE, 2, (int)($alive_time / 1000 / 60), $account_id); + $quest->triggerQuest(QUEST_SUM_ALIVE, 2, $skill, $account_id); $quest->triggerQuest(QUEST_SUM_HARM, 2, $harm, $account_id); $quest->triggerQuest(QUEST_SUM_KILL, 2, $kills, $account_id); $quest->triggerQuest(QUEST_SUM_SKILL, 2, $skill, $account_id); @@ -278,6 +280,7 @@ class RoleController{ break; } } + error_log(11111111); $extra_drop = ""; $skin_id = $skin_id_array[$keys][0]; $skin_num = $skin_num_array[$keys][0]; @@ -287,6 +290,7 @@ class RoleController{ } else { $extra_drop = '10001:' . $extra_coin . '|10002:1' . '|' . $skin_id . ':' . $skin_num; } + error_log($extra_drop); echo json_encode(array( 'errcode' => 0, 'errmsg' => '',