移除Role无用代码

This commit is contained in:
aozhiwei 2021-11-19 19:40:43 +08:00
parent 66c5417af2
commit c3af13a332

View File

@ -20,23 +20,6 @@ class RoleController extends BaseAuthedController {
return $p;
}
protected function getActivityRewardConfig($activityReward_id)
{
$g_conf_activityReward_cluster = require('../res/activityReward@activityReward.php');
$activityReward_conf = getActivityRewardConfig($g_conf_activityReward_cluster, $activityReward_id);
$act = array(
'id' => $activityReward_conf['id'],
'activity_id' => $activityReward_conf['activity_id'],
'condition' => $activityReward_conf['condition'],
'parameter' => $activityReward_conf['parameter'],
'start_end_time' => $activityReward_conf['start_end_time'],
'activity_reward' => $activityReward_conf['activity_reward'],
'exchange_num' => $activityReward_conf['exchange_num'],
'exchange_item' => $activityReward_conf['exchange_item']
);
return $act;
}
protected function getDrop($drop_id)
{
$g_conf_drop_cluster = require('../res/drop@drop.php');
@ -135,7 +118,6 @@ class RoleController extends BaseAuthedController {
return $e;
}
public function roleInfo()
{
@ -653,177 +635,6 @@ class RoleController extends BaseAuthedController {
)
);
$this->rspOk();
/*
$rank = $_REQUEST['rank']; //排名
$kills = $_REQUEST['kills']; //击杀数
$harm = $_REQUEST['harm']; //伤害
$alive_time = $_REQUEST['alive_time']; //存活时间
$team_status = $_REQUEST['team_status']; //是否是组队状态
$kill_his = $kills;
$harm_his = $harm;
$alive_time_his = $alive_time;
$coin_num = $_REQUEST['coin_num']; //金币
$integral = $_REQUEST['rank_score']; //排位积分
$team_status = $_REQUEST['team_status'];
$row = $conn->execQueryOne('SELECT * FROM user WHERE accountid=:accountid;',
array(
':accountid' => $account_id
));
$addreward = new classes\AddReward();
$val = $addreward->getVipVal($account_id, 1);
$coin_num = floor($coin_num + $coin_num * $val / 100);
if (!$row) {
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家1');
return;
}
//更新排位积分信息时间
if ($integral != 0) {
$min_score = 0;
$update_maxscore = $row['max_integral'];
if ($integral > 0) {
$update_maxscore = $integral + $row['max_integral'];
}
$update_score = $integral + $row['integral'];
$is_pro = 0;
$seaPoint_meta_table = require('../res/seasomPoint@seasomPoint.php');
for ($ii = 1; $ii <= count($seaPoint_meta_table); $ii++) {
$seaPoint = $this->getSeasonPoint($ii);
if ($row['integral'] >= $seaPoint['min'] && $row['integral'] <= $seaPoint['max']
|| $row['integral'] >= $seaPoint['min'] && $seaPoint['max'] == -1) {
$is_pro = $seaPoint['is_protect'];
$min_score = $seaPoint['min'];
}
}
if ($is_pro == 1 && $min_score > $update_score) {
$update_score = $min_score;
}
$inret = $conn->execScript('UPDATE user SET integral=:integral, max_integral=:max_integral, rank_modifytime=:rank_modifytime ' .
' WHERE accountid=:accountid;',
array(
':accountid' => $account_id,
':integral' => $update_score,
':rank_modifytime' => phpcommon\getNowTime(),
':max_integral' => $update_maxscore,
));
if (!$inret) {
die();
return;
}
}
//更新击杀信息时间
$k = 0;
if ($row['game_times'] != 0) {
$k = $row['kill_his'] / $row['game_times'];
}
if (($row['kill_his'] + $kills) / ($row['game_times'] + 1) != $k) {
$killret = $conn->execScript('UPDATE user SET kill_modifytime=:kill_modifytime ' .
' WHERE accountid=:accountid;',
array(
':accountid' => $account_id,
':kill_modifytime' => phpcommon\getNowTime(),
));
if (!$killret) {
die();
return;
}
}
//更新胜场信息时间
if ($rank == 1) {
$winret = $conn->execScript('UPDATE user SET win_times=:win_times, season_win=:season_win, win_modifytime=:win_modifytime ' .
' WHERE accountid=:accountid;',
array(
':accountid' => $account_id,
':win_times' => $row['win_times'] + 1,
':season_win' => $row['season_win'] + 1,
':win_modifytime' => phpcommon\getNowTime(),
));
if (!$winret) {
die();
return;
}
}
//更新历史最高信息
if ($kill_his < $row['kill_his']) {
$kill_his = $row['kill_his'];
}
if ($harm_his < $row['harm_his']) {
$harm_his = $row['harm_his'];
}
$sea_max_hart = $harm;
if ($sea_max_hart < $row['sea_max_hart']) {
$sea_max_hart = $row['sea_max_hart'];
}
$sea_max_kill = $kills;
if ($sea_max_kill < $row['sea_max_kill']) {
$sea_max_kill = $row['sea_max_kill'];
}
if ($alive_time_his < $row['alive_time_his']) {
$alive_time_his = $row['alive_time_his'];
}
$nowTime = phpcommon\getdayseconds(phpcommon\getNowTime());
$daily_time = $row['daily_time'];
if ($daily_time == 0 || ($nowTime - phpcommon\getdayseconds($daily_time) > 0)) {
$daily_time = phpcommon\getNowTime();
}
$daily_first_login = $row['daily_first_login'];
$newhand = $row['newhand'];
$newhand2 = $row['newhand2'];
$game_times2 = $row['game_times2'];
$p1 = $this->getParameter(NEWHAND_NUM1);
$fight_times = $p1['param_value'];
$p2 = $this->getParameter(NEWHAND_NUM2);
$view_times = $p2['param_value'];
$p3 = $this->getParameter(CREAM_TASK_01);
$fight_times2 = $p3['param_value'];
$p4 = $this->getParameter(CREAM_TASK_02);
$view_times2 = $p4['param_value'];
if ($row['game_times'] + 1 == $fight_times && $row['vip_score'] >= $view_times) {
$newhand = 1;
}
if ($newhand == 2) {
if ($row['game_times2'] + 1 == $fight_times2 && $row['view_times2'] >= $view_times2) {
$newhand2 = 1;
}
$game_times2++;
}
$ret = $conn->execScript('UPDATE user SET game_times=:game_times, kills=:kills, harm=:harm, alive_time=:alive_time, kill_his=:kill_his, alive_time_his=:alive_time_his, harm_his=:harm_his, coin_num=:coin_num, modify_time=:modify_time, first_fight=1, daily_time=:daily_time, season_games=:season_games, sea_max_kill=:sea_max_kill, sea_max_hart=:sea_max_hart, sea_avg_kill=:sea_avg_kill, newhand=:newhand, newhand2=:newhand2, game_times2=:game_times2 ' .
'WHERE accountid=:accountid;',
array(
':game_times' => $row['game_times'] + 1,
':kill_his' => $kill_his,
':kills' => $row['kills'] + $kills,
':harm_his' => $harm_his,
':harm' => $row['harm'] + $harm,
':alive_time' => $row['alive_time'] + $alive_time,
':alive_time_his' => $alive_time_his,
':accountid' => $account_id,
':coin_num' => $row['coin_num'] + $coin_num,
':modify_time' => phpcommon\getNowTime(),
':daily_time' => $daily_time,
':season_games' => $row['season_games'] + 1,
':sea_max_kill' => $sea_max_kill,
':sea_max_hart' => $sea_max_hart,
':sea_avg_kill' => $row['sea_avg_kill'] + $kills,
':newhand' => $newhand,
':newhand2' => $newhand2,
':game_times2' => $game_times2,
));
if (!$ret) {
die();
return;
}
$addreward = new classes\Addreward();
$vip_level = $addreward->getVipLevel($account_id);
echo json_encode(array(
'errcode' => 0,
'errmsg' => '',
));
*/
}
public function battleReport()
@ -2422,4 +2233,3 @@ class RoleController extends BaseAuthedController {
}
}