1
This commit is contained in:
parent
a2eca10288
commit
402b1c14e1
@ -139,7 +139,6 @@ class RoleController{
|
|||||||
|
|
||||||
public function battleReport()
|
public function battleReport()
|
||||||
{
|
{
|
||||||
error_log(json_encode($_REQUEST));
|
|
||||||
$account_id = $_REQUEST['account_id']; //账号
|
$account_id = $_REQUEST['account_id']; //账号
|
||||||
$conn = $this->getMysql($account_id);
|
$conn = $this->getMysql($account_id);
|
||||||
if (!$conn) {
|
if (!$conn) {
|
||||||
@ -176,7 +175,6 @@ class RoleController{
|
|||||||
':accountid' => $account_id
|
':accountid' => $account_id
|
||||||
));
|
));
|
||||||
if (!$row) {
|
if (!$row) {
|
||||||
error_log($row);
|
|
||||||
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家1');
|
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家1');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -189,7 +187,6 @@ class RoleController{
|
|||||||
if ($rank == 1) {
|
if ($rank == 1) {
|
||||||
$row['win_times']++;
|
$row['win_times']++;
|
||||||
}
|
}
|
||||||
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 ' .
|
$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;',
|
' WHERE accountid=:accountid;',
|
||||||
array(
|
array(
|
||||||
@ -232,7 +229,6 @@ class RoleController{
|
|||||||
die();
|
die();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
error_log(222222);
|
|
||||||
//刷新任务
|
//刷新任务
|
||||||
$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);
|
||||||
@ -243,7 +239,6 @@ class RoleController{
|
|||||||
$quest->triggerQuest(QUEST_SUM_ALIVE, 2, $skill, $account_id);
|
$quest->triggerQuest(QUEST_SUM_ALIVE, 2, $skill, $account_id);
|
||||||
$quest->triggerQuest(QUEST_SUM_HARM, 2, $harm, $account_id);
|
$quest->triggerQuest(QUEST_SUM_HARM, 2, $harm, $account_id);
|
||||||
$quest->triggerQuest(QUEST_SUM_KILL, 2, $kills, $account_id);
|
$quest->triggerQuest(QUEST_SUM_KILL, 2, $kills, $account_id);
|
||||||
$quest->triggerQuest(QUEST_SUM_SKILL, 2, $skill, $account_id);
|
|
||||||
$quest->triggerQuest(QUEST_SUM_TANK1KILL, 2, $tank1_kill, $account_id);
|
$quest->triggerQuest(QUEST_SUM_TANK1KILL, 2, $tank1_kill, $account_id);
|
||||||
$quest->triggerQuest(QUEST_SUM_TANK2KILL, 2, $tank2_kill, $account_id);
|
$quest->triggerQuest(QUEST_SUM_TANK2KILL, 2, $tank2_kill, $account_id);
|
||||||
$quest->triggerQuest(QUEST_SUM_TANK3KILL, 2, $tank3_kill, $account_id);
|
$quest->triggerQuest(QUEST_SUM_TANK3KILL, 2, $tank3_kill, $account_id);
|
||||||
@ -257,14 +252,12 @@ class RoleController{
|
|||||||
//额外奖励
|
//额外奖励
|
||||||
$times = $this->getRewardTimes($coin_num);
|
$times = $this->getRewardTimes($coin_num);
|
||||||
$extra_coin = $coin_num * ($times - 1);
|
$extra_coin = $coin_num * ($times - 1);
|
||||||
error_log(11111111);
|
|
||||||
$p_battle_reward = $this->getParameter(MAX_BATTLE_REWARD);
|
$p_battle_reward = $this->getParameter(MAX_BATTLE_REWARD);
|
||||||
if ($row['battle_re_times'] >= $p_battle_reward['param_value']) {
|
if ($row['battle_re_times'] >= $p_battle_reward['param_value']) {
|
||||||
$extra_drop = '10001:' . $extra_coin;
|
$extra_drop = '10001:' . $extra_coin;
|
||||||
} else {
|
} else {
|
||||||
$extra_drop = '10001:' . $extra_coin . '|10002:1';
|
$extra_drop = '10001:' . $extra_coin . '|10002:1';
|
||||||
}
|
}
|
||||||
error_log($extra_drop);
|
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
'errcode' => 0,
|
'errcode' => 0,
|
||||||
'errmsg' => '',
|
'errmsg' => '',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user