This commit is contained in:
aozhiwei 2019-08-15 13:37:28 +08:00
parent 16f902d9a4
commit 969e60793a
15 changed files with 380 additions and 164 deletions

View File

@ -64,6 +64,7 @@ CREATE TABLE `user` (
`shop_flush_times` int(11) NOT NULL DEFAULT '0' COMMENT '每日商店刷新次数', `shop_flush_times` int(11) NOT NULL DEFAULT '0' COMMENT '每日商店刷新次数',
`kefu_status` int(11) NOT NULL DEFAULT '0' COMMENT '客服奖励状态(0:未领取,1:已领取)', `kefu_status` int(11) NOT NULL DEFAULT '0' COMMENT '客服奖励状态(0:未领取,1:已领取)',
`sign_sum` int(11) NOT NULL DEFAULT '0' COMMENT '签到总天数', `sign_sum` int(11) NOT NULL DEFAULT '0' COMMENT '签到总天数',
`box_num` int(11) NOT NULL DEFAULT '0' COMMENT '空投宝箱数量',
PRIMARY KEY (`idx`), PRIMARY KEY (`idx`),
UNIQUE KEY `accountid` (`accountid`) UNIQUE KEY `accountid` (`accountid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

View File

@ -144,7 +144,6 @@ def dayReadMysqlData(rushtime):
' harm, win_times, game_times, idx FROM user WHERE idx > %s LIMIT 0, 1000' % (last_idx)) ' harm, win_times, game_times, idx FROM user WHERE idx > %s LIMIT 0, 1000' % (last_idx))
has_data = False has_data = False
print(kill_list)
for row in cursor: for row in cursor:
refreshData(row, kill_list, alive_list, harm_list, rate_list, win_list) refreshData(row, kill_list, alive_list, harm_list, rate_list, win_list)
temp_idx = int(row[8]) temp_idx = int(row[8])
@ -211,8 +210,6 @@ def readMysqlData(rushtime):
' harm, win_times, game_times, idx, modify_time FROM user ' ' harm, win_times, game_times, idx, modify_time FROM user '
' WHERE modify_time > %s AND idx > %s LIMIT 0, 1000' % (time.time() - 300, last_idx)) ' WHERE modify_time > %s AND idx > %s LIMIT 0, 1000' % (time.time() - 300, last_idx))
has_data = False has_data = False
print(3333333)
print(kill_list)
for row in cursor: for row in cursor:
for rowKill in kill_list: for rowKill in kill_list:
if (rowKill[0] == row[0]): if (rowKill[0] == row[0]):
@ -257,8 +254,8 @@ if __name__ == "__main__":
lambda : readMysqlData(conf['rushtime']) lambda : readMysqlData(conf['rushtime'])
) )
conf['rushtime'] = 17 * 3600 conf['day_rushtime'] = 17 * 3600
tornado.ioloop.IOLoop.current().call_later(getDaySeconds(time.time(), 1) + conf['rushtime'], tornado.ioloop.IOLoop.current().call_later(getDaySeconds(time.time(), 1) + conf['day_rushtime'],
lambda : dayReadMysqlData(conf['rushtime']) lambda : dayReadMysqlData(conf['day_rushtime'])
) )
tornado.ioloop.IOLoop.current().start() tornado.ioloop.IOLoop.current().start()

View File

@ -152,5 +152,11 @@ function getRandrewardConfig($re_table, $re_id)
$re_id = (int)$re_id; $re_id = (int)$re_id;
return array_key_exists($re_id, $re_table) ? $re_table[$re_id] : null; return array_key_exists($re_id, $re_table) ? $re_table[$re_id] : null;
} }
function getRobotConfig($robot_table, $robot_id)
{
$robot_id = (int)$robot_id;
return array_key_exists($robot_id, $robot_table) ? $robot_table[$robot_id] : null;
}
checkMysqlConfig(); checkMysqlConfig();
checkRedisConfig(); checkRedisConfig();

View File

@ -71,6 +71,7 @@ define('MAX_BATTLE_REWARD', 40); //战斗额外奖励次数
define('MAX_SHOP_REFRESH', 41); //每日商店刷新次数 define('MAX_SHOP_REFRESH', 41); //每日商店刷新次数
define('FREELOTTERY_TIME', 45); //免费抽奖次数 define('FREELOTTERY_TIME', 45); //免费抽奖次数
define('VIDEOLOTTERY_TIME', 46); //视频抽奖次数 define('VIDEOLOTTERY_TIME', 46); //视频抽奖次数
define('REWARD_TIMES', 54); //看视频奖励倍数
require 'config_loader.php'; require 'config_loader.php';

View File

@ -46,6 +46,23 @@ class AddReward {
':accountid' => $account_id, ':accountid' => $account_id,
':fragment_id' => $item_id ':fragment_id' => $item_id
)); ));
if (!$rowSkin) {
$ret = $conn->execScript('INSERT INTO skin(accountid, skin_id, skin_status, fragment_id, fragment_num, active_time, fragment_status, skin_type, skin_level, skin_experience_level, skin_experience_type, create_time, modify_time) ' .
' VALUES(:account_id, :skin_id, :skin_status, :fragment_id, 0, 0, 0, :skin_type, 1, 0, 0, :create_time, :modify_time) ' .
' ON DUPLICATE KEY UPDATE accountid=:account_id, skin_id=:skin_id, skin_status=:skin_status, fragment_id=:fragment_id, fragment_num=0, active_time=0, fragment_status=0, skin_type=:skin_type, skin_level=1, skin_experience_level=0, skin_experience_type=0, modify_time=:modify_time;',
array(
':account_id' => $account_id,
':skin_id' => $item_id + 1000,
':skin_status' => 2,
':fragment_id' => $item_id,
':skin_type' => 1,
':create_time' => time(),
':modify_time' => time()
));
if(!$ret){
die();
}
} else {
$ret = $conn->execScript('UPDATE skin SET fragment_num=:fragment_num, modify_time=:modify_time ' . $ret = $conn->execScript('UPDATE skin SET fragment_num=:fragment_num, modify_time=:modify_time ' .
' WHERE accountid=:accountid AND fragment_id=:fragment_id;', ' WHERE accountid=:accountid AND fragment_id=:fragment_id;',
array( array(
@ -57,6 +74,7 @@ class AddReward {
if (!$ret) { if (!$ret) {
die(); die();
} }
}
} else if ($item_id == 10002) { } else if ($item_id == 10002) {
$rowkey = $conn->execQueryOne('SELECT keys_num FROM user WHERE accountid=:accountid;', $rowkey = $conn->execQueryOne('SELECT keys_num FROM user WHERE accountid=:accountid;',
array( array(

View File

@ -79,6 +79,7 @@ class ActivityController{
'item_id' => $lot_conf['item_id'], 'item_id' => $lot_conf['item_id'],
'num' => $lot_conf['num'], 'num' => $lot_conf['num'],
'weight' => $lot_conf['weight'], 'weight' => $lot_conf['weight'],
'quailty' => $lot_conf['quailty'],
'jilv' => $lot_conf['jilv'], 'jilv' => $lot_conf['jilv'],
); );
return $l; return $l;
@ -160,6 +161,7 @@ class ActivityController{
$r -> set($draw_uuid, json_encode($draw_db)); $r -> set($draw_uuid, json_encode($draw_db));
$r -> pexpire($draw_uuid, 1000 * 3600 * 24); $r -> pexpire($draw_uuid, 1000 * 3600 * 24);
} else { } else {
$draw_db = json_decode($user_db_str, true);
$rowTime = $conn->execQueryOne('SELECT modify_time FROM activity WHERE accountid=:accountid;', $rowTime = $conn->execQueryOne('SELECT modify_time FROM activity WHERE accountid=:accountid;',
array( array(
':accountid' => $account_id ':accountid' => $account_id
@ -182,6 +184,7 @@ class ActivityController{
array_push($draw_list, array( array_push($draw_list, array(
'item_id' => $draw['item_id'], 'item_id' => $draw['item_id'],
'item_num' => $draw['item_num'], 'item_num' => $draw['item_num'],
'quailty' => $draw['quailty'],
)); ));
} }
} }
@ -229,7 +232,8 @@ class ActivityController{
} }
$random = Rand(0, $weight_sum); $random = Rand(0, $weight_sum);
$weight = 0; $weight = 0;
for ($ii = 0; $ii < count($g_conf_lot_cluster); $ii++) { $key = 0;
for ($ii = 1; $ii <= count($g_conf_lot_cluster); $ii++) {
$l = $this->getLottery($ii); $l = $this->getLottery($ii);
$weight += $l['jilv']; $weight += $l['jilv'];
if ($weight > $random) { if ($weight > $random) {
@ -253,7 +257,7 @@ class ActivityController{
return; return;
} }
foreach ($user_db['draw_list'] as $draw) { foreach ($user_db['draw_list'] as $draw) {
if ($draw['key'] == $key + 1) { if ($draw['key'] == $key - 1) {
$item_id = $draw['item_id']; $item_id = $draw['item_id'];
$item_num = $draw['item_num']; $item_num = $draw['item_num'];
$flag = 1; $flag = 1;
@ -308,14 +312,6 @@ class ActivityController{
//增加奖励 //增加奖励
$addreward = new classes\AddReward(); $addreward = new classes\AddReward();
$addreward->addReward($item_id, $item_num, $account_id); $addreward->addReward($item_id, $item_num, $account_id);
//刷新奖励
$draw_list = $this->randomReward();
$draw_db = array(
'draw_uuid' => $draw_uuid,
'draw_list' => $draw_list,
);
$r -> set($draw_uuid, json_encode($draw_db));
$r -> pexpire($draw_uuid, 1000 * 3600 * 24);
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
'errmsg'=> '', 'errmsg'=> '',
@ -347,8 +343,10 @@ class ActivityController{
return; return;
} }
//增加奖励 //增加奖励
$p = $this->getParameter(REWARD_TIMES);
$times = $p['value'] - 1;
$addreward = new classes\AddReward(); $addreward = new classes\AddReward();
$addreward->addReward($row['item_id'], $row['item_num'], $account_id); $addreward->addReward($row['item_id'], $row['item_num'] * $times, $account_id);
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
'errmsg'=> '', 'errmsg'=> '',
@ -381,12 +379,15 @@ class ActivityController{
} }
$item_id_array = $this->getExplode($l['item_id']); $item_id_array = $this->getExplode($l['item_id']);
$num_array = $this->getExplode($l['num']); $num_array = $this->getExplode($l['num']);
$quailty_array = $this->getExplode($l['quailty']);
$item_id = $item_id_array[$key][0]; $item_id = $item_id_array[$key][0];
$item_num = $num_array[$key][0]; $item_num = $num_array[$key][0];
$quailty = $quailty_array[$key][0];
array_push($draw_list, array( array_push($draw_list, array(
'key' => $i, 'key' => $i - 1,
'item_id' => $item_id, 'item_id' => $item_id,
'item_num' => $item_num, 'item_num' => $item_num,
'quailty' => $quailty,
)); ));
} }
return $draw_list; return $draw_list;
@ -467,6 +468,7 @@ class ActivityController{
} }
foreach ($user_db['randreward_list'] as $randreward) { foreach ($user_db['randreward_list'] as $randreward) {
//增加奖励 //增加奖励
error_log($randreward['item_num']);
$addreward = new classes\AddReward(); $addreward = new classes\AddReward();
$addreward->addReward($randreward['item_id'], $randreward['item_num'], $account_id); $addreward->addReward($randreward['item_id'], $randreward['item_num'], $account_id);
} }
@ -501,10 +503,12 @@ class ActivityController{
phpcommon\sendError(ERR_USER_BASE + 1,'session失效'); phpcommon\sendError(ERR_USER_BASE + 1,'session失效');
return; return;
} }
$p = $this->getParameter(REWARD_TIMES);
$times = $p['value'];
foreach ($user_db['randreward_list'] as $randreward) { foreach ($user_db['randreward_list'] as $randreward) {
//增加奖励 //增加奖励
$addreward = new classes\AddReward(); $addreward = new classes\AddReward();
$addreward->addReward($randreward['item_id'], $randreward['item_num'], $account_id); $addreward->addReward($randreward['item_id'], $randreward['item_num'] * $times, $account_id);
} }
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
@ -557,7 +561,23 @@ class ActivityController{
phpcommon\sendError(ERR_USER_BASE + 1, 'session无效'); phpcommon\sendError(ERR_USER_BASE + 1, 'session无效');
return; return;
} }
$conn = $this->getMysql($account_id);
if (!$conn) {
phpcommon\sendError(ERR_USER_BASE + 2, '没有这个玩家');
return;
}
$row = $conn->execQueryOne('SELECT box_num FROM user WHERE accountid=:accountid;',
array(
':accountid' => $account_id
));
if (!$row) {
phpcommon\sendError(ERR_USER_BASE + 2, '没有这个玩家');
return;
}
if ($row['box_num'] <= 0) {
phpcommon\sendError(ERR_USER_BASE + 2, '今日开箱子次数已用完');
return;
}
$airReward_uuid = 'game2001api_airReward_uuid:' . md5($_REQUEST['account_id']); $airReward_uuid = 'game2001api_airReward_uuid:' . md5($_REQUEST['account_id']);
$airReward_list = array(); $airReward_list = array();
$r = $this->getRedis($airReward_uuid); $r = $this->getRedis($airReward_uuid);
@ -566,6 +586,8 @@ class ActivityController{
return; return;
} }
$user_db_str = $r->get($airReward_uuid); $user_db_str = $r->get($airReward_uuid);
$airReward_num = 0;
$last_time = 0;
if (empty($user_db_str)) { if (empty($user_db_str)) {
$airReward_list = $this->getRandomAirReward(); $airReward_list = $this->getRandomAirReward();
$airReward_db = array( $airReward_db = array(
@ -575,6 +597,8 @@ class ActivityController{
$r -> set($airReward_uuid, json_encode($airReward_db)); $r -> set($airReward_uuid, json_encode($airReward_db));
$r -> pexpire($airReward_uuid, 1000 * 60); $r -> pexpire($airReward_uuid, 1000 * 60);
} else { } else {
$user_db = json_decode($user_db_str, true);
unset($user_db['airReward_list']);
$airReward_list = $this->getRandomAirReward(); $airReward_list = $this->getRandomAirReward();
$airReward_db = array( $airReward_db = array(
'airReward_uuid' => $airReward_uuid, 'airReward_uuid' => $airReward_uuid,
@ -583,6 +607,17 @@ class ActivityController{
$r -> set($airReward_uuid, json_encode($airReward_db)); $r -> set($airReward_uuid, json_encode($airReward_db));
$r -> pexpire($airReward_uuid, 1000 * 60); $r -> pexpire($airReward_uuid, 1000 * 60);
} }
$ret = $conn->execScript('UPDATE user SET box_num=:box_num, modify_time=:modify_time ' .
' WHERE accountid=:accountid;',
array(
':accountid' => $account_id,
':box_num' => $row['box_num'] - 1,
':modify_time' => time()
));
if (!$ret) {
die();
return;
}
foreach ($airReward_list as $airReward) { foreach ($airReward_list as $airReward) {
//增加奖励 //增加奖励
$addreward = new classes\AddReward(); $addreward = new classes\AddReward();
@ -605,7 +640,6 @@ class ActivityController{
phpcommon\sendError(ERR_USER_BASE + 1, 'session无效'); phpcommon\sendError(ERR_USER_BASE + 1, 'session无效');
return; return;
} }
$airReward_uuid = 'game2001api_airReward_uuid:' . md5($_REQUEST['account_id']); $airReward_uuid = 'game2001api_airReward_uuid:' . md5($_REQUEST['account_id']);
$airReward_list = array(); $airReward_list = array();
$r = $this->getRedis($airReward_uuid); $r = $this->getRedis($airReward_uuid);
@ -623,15 +657,16 @@ class ActivityController{
phpcommon\sendError(ERR_USER_BASE + 1,'session失效'); phpcommon\sendError(ERR_USER_BASE + 1,'session失效');
return; return;
} }
$p = $this->getParameter(REWARD_TIMES);
$times = $p['value'] - 1;
foreach ($user_db['airReward_list'] as $airReward) { foreach ($user_db['airReward_list'] as $airReward) {
//增加奖励 //增加奖励
$addreward = new classes\AddReward(); $addreward = new classes\AddReward();
$addreward->addReward($airReward['item_id'], $airReward['item_num'], $account_id); $addreward->addReward($airReward['item_id'], $airReward['item_num'] * $times, $account_id);
} }
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
'errmsg'=> '', 'errmsg'=> '',
'item_list' => $airReward_list
)); ));
} }

View File

@ -218,10 +218,6 @@ class EquipController{
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
'errmsg' => '', 'errmsg' => '',
/*'equip_id' => $equip_id,
'equip_level' => $equip_level,
'equip_time' => 0,
'coin_num' => -($e['equip_cost'] * ceil($equip_level / 5) + $e['cost_int'])*/
)); ));
} }
@ -288,9 +284,6 @@ class EquipController{
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
'errmsg' => '', 'errmsg' => '',
/*'equip_id' => $equip_id,
'equip_level' => $e['max_lv'],
'equip_time' => time() + $time,*/
)); ));
} }
} }

View File

@ -68,7 +68,8 @@ class HangController{
$num = floor($p_time_limit['param_value'] / 5 * $p_num['param_value']); $num = floor($p_time_limit['param_value'] / 5 * $p_num['param_value']);
} }
if ($weight != 0) { if ($weight != 0) {
$times = $this->getRewardTimes($num); $p = $this->getParameter(REWARD_TIMES);
$times = $p['param_value'] - 1;
$num = $num * $times; $num = $num * $times;
} }
$row = $conn->execQueryOne('SELECT * FROM user WHERE accountid=:accountid;', $row = $conn->execQueryOne('SELECT * FROM user WHERE accountid=:accountid;',
@ -145,21 +146,5 @@ class HangController{
'num' => $num 'num' => $num
)); ));
} }
protected function getRewardTimes($coin_num)
{
$g_conf_reward_cluster = require('../res/rewardTimes@rewardTimes.php');
$times = 1;
$reward_conf = array();
for ($i = 0; $i < 4; $i++) {
$reward_id = $i + 91000;
$reward_conf = getRewardTimesConfig($g_conf_reward_cluster, $reward_id);
if ((int)$coin_num >= $reward_conf['minGold'] && (int)$coin_num <= $reward_conf['maxGold']) {
$times = $reward_conf['times'];
break;
}
}
return $times;
}
} }
?> ?>

View File

@ -33,6 +33,18 @@ class QuestController{
return $q; return $q;
} }
protected function getParameter($para_id)
{
$parameter_meta_cluster = require('../res/parameter@parameter.php');
$parameter_meta = getParameterConfig($parameter_meta_cluster, $para_id);
$p = array(
'id' => $parameter_meta['id'],
'name' => $parameter_meta['param_name'],
'value' => $parameter_meta['param_value'],
);
return $p;
}
protected function getTaskReward($taskReward_id) protected function getTaskReward($taskReward_id)
{ {
$g_conf_taskReward_cluster = require('../res/taskReward@taskReward.php'); $g_conf_taskReward_cluster = require('../res/taskReward@taskReward.php');
@ -292,6 +304,70 @@ class QuestController{
)); ));
} }
public function doubleQuestReward()
{
$account_id = $_REQUEST['account_id'];
//登录校验
$login = loginVerify($account_id, $_REQUEST['session_id']);
if (!$login) {
phpcommon\sendError(ERR_USER_BASE + 1, 'session无效');
return;
}
$quest_id = $_REQUEST['quest_id'];
$quest_type = $_REQUEST['type'];
$p = $this->getParameter(REWARD_TIMES);
$times = $p['value'] - 1;
//发奖励
if ($quest_type == 0) {
$t = $this->getTaskReward($quest_id);
if (!$t) {
phpcommon\sendError(ERR_USER_BASE + 2, '没有这个任务');
return;
}
$d = $this->getDrop($t['reward']);
if (!$d) {
phpcommon\sendError(ERR_USER_BASE + 3, '没有这个奖励');
return;
}
$weight_sum = 0;
$weight_array = $this->getExplode($d['weight']);
for ($i = 0; $i < count($weight_array); $i++) {
$weight_sum += $weight_array[$i][0];
}
$random = Rand(0, $weight_sum);
$weight = 0;
for ($i = 0; $i < count($weight_array); $i++) {
$weight += $weight_array[$i][0];
if ($weight > $random) {
$key = $i;
break;
}
}
$item_id_array = $this->getExplode($d['item_id']);
$num_array = $this->getExplode($d['num']);
$item_id = $item_id_array[$key][0];
$item_num = $num_array[$key][0] * $times;
$addreward = new classes\AddReward();
$addreward->addReward($item_id, $item_num, $account_id);
} else {
$q = $this->getQuest($quest_id);
if (!$q) {
phpcommon\sendError(ERR_USER_BASE + 2, '没有这个任务');
return;
}
$array = $this->getExplode($q['reward']);
$reward_id = $array[0][0];
$reward_num = $array[0][1] * $times;
$addreward = new classes\AddReward();
$addreward->addReward($reward_id, $reward_num, $account_id);
}
echo json_encode(array(
'errcode' => 0,
'errmsg' => '',
));
}
public function submitQuest() public function submitQuest()
{ {
$account_id = $_REQUEST['account_id']; $account_id = $_REQUEST['account_id'];
@ -303,11 +379,6 @@ class QuestController{
} }
$quest_id = $_REQUEST['quest_id']; $quest_id = $_REQUEST['quest_id'];
$quest_type = $_REQUEST['type']; $quest_type = $_REQUEST['type'];
$double = $_REQUEST['double'];
$reward_times = 1;
if ($double == 1) {
$reward_times = 2;
}
$conn = $this->getMysql($account_id); $conn = $this->getMysql($account_id);
if (!$conn) { if (!$conn) {
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家'); phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
@ -369,7 +440,7 @@ class QuestController{
$item_id_array = $this->getExplode($d['item_id']); $item_id_array = $this->getExplode($d['item_id']);
$num_array = $this->getExplode($d['num']); $num_array = $this->getExplode($d['num']);
$item_id = $item_id_array[$key][0]; $item_id = $item_id_array[$key][0];
$item_num = $num_array[$key][0] * $reward_times; $item_num = $num_array[$key][0];
array_push($item_list, array( array_push($item_list, array(
'item_id' => $item_id, 'item_id' => $item_id,
'item_num' => $item_num, 'item_num' => $item_num,

View File

@ -100,9 +100,9 @@ class RoleController{
':accountid' => $account_id ':accountid' => $account_id
)); ));
if (!$row) { if (!$row) {
$ret = $conn->execScript('INSERT INTO user(accountid, user_name, avatar_url, game_times, win_times, kills, harm, add_HP, alive_time, coin_num, integral, kill_his, alive_time_his, harm_his, add_HP_his, act_share_time, act_share_status, create_time, modify_time, first_fight, collect_status, keys_num, battle_re_times, shop_flush_times, kefu_status, sign_sum) ' . $ret = $conn->execScript('INSERT INTO user(accountid, user_name, avatar_url, game_times, win_times, kills, harm, add_HP, alive_time, coin_num, integral, kill_his, alive_time_his, harm_his, add_HP_his, act_share_time, act_share_status, create_time, modify_time, first_fight, collect_status, keys_num, battle_re_times, shop_flush_times, kefu_status, sign_sum, box_num) ' .
' VALUES(:accountid, :user_name, :avatar_url, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, create_time, :modify_time, 0, 0, 0, 0, 0, 0, 0) ' . ' VALUES(:accountid, :user_name, :avatar_url, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, create_time, :modify_time, 0, 0, 0, 0, 0, 0, 0, 0) ' .
' ON DUPLICATE KEY UPDATE accountid=:accountid, user_name=:user_name, avatar_url=:avatar_url, game_times=0, win_times=0, kills=0, harm=0, add_HP=0, alive_time=0, coin_num=0, integral=0, kill_his=0, alive_time_his=0, harm_his=0, add_HP_his=0, act_share_time=0, act_share_status=0, modify_time=:modify_time, first_fight=0, collect_status=0, keys_num=0, battle_re_times=0, shop_flush_times=0, kefu_status=0, sign_sum=0;', ' ON DUPLICATE KEY UPDATE accountid=:accountid, user_name=:user_name, avatar_url=:avatar_url, game_times=0, win_times=0, kills=0, harm=0, add_HP=0, alive_time=0, coin_num=0, integral=0, kill_his=0, alive_time_his=0, harm_his=0, add_HP_his=0, act_share_time=0, act_share_status=0, modify_time=:modify_time, first_fight=0, collect_status=0, keys_num=0, battle_re_times=0, shop_flush_times=0, kefu_status=0, sign_sum=0, box_num=0;',
array( array(
':accountid' => $account_id, ':accountid' => $account_id,
':user_name' => $user_name, ':user_name' => $user_name,
@ -129,7 +129,8 @@ class RoleController{
'first_fight' => 0, 'first_fight' => 0,
'collect_status' => 0, 'collect_status' => 0,
'keys_num' => 0, 'keys_num' => 0,
'kefu_status' => 0 'kefu_status' => 0,
'box_num' => 0
)); ));
} else { } else {
echo json_encode(array( echo json_encode(array(
@ -148,6 +149,7 @@ class RoleController{
'collect_status' => $row['collect_status'], 'collect_status' => $row['collect_status'],
'keys_num' => $row['keys_num'], 'keys_num' => $row['keys_num'],
'kefu_status' => $row['kefu_status'], 'kefu_status' => $row['kefu_status'],
'box_num' => $row['box_num']
)); ));
} }
} }
@ -190,7 +192,6 @@ class RoleController{
if (!$map_tpl_name) { if (!$map_tpl_name) {
$map_tpl_name = ''; $map_tpl_name = '';
} }
$row = $conn->execQueryOne('SELECT * FROM user WHERE accountid=:accountid;', $row = $conn->execQueryOne('SELECT * FROM user WHERE accountid=:accountid;',
array( array(
':accountid' => $account_id ':accountid' => $account_id
@ -214,7 +215,12 @@ class RoleController{
if ($add_HP_his < $row['add_HP_his']) { if ($add_HP_his < $row['add_HP_his']) {
$add_HP_his = $row['add_HP_his']; $add_HP_his = $row['add_HP_his'];
} }
$ret = $conn->execScript('UPDATE user SET game_times=:game_times, win_times=:win_times, kills=:kills, harm=:harm, add_HP=:add_HP, alive_time=:alive_time, kill_his=:kill_his, alive_time_his=:alive_time_his, harm_his=:harm_his, add_HP_his=:add_HP_his, coin_num=:coin_num, integral=:integral, modify_time=:modify_time, first_fight=1 ' . //添加空投箱
$box_num = $row['box_num'];
if ($row['box_num'] + 1 <= 20) {
$box_num = $row['box_num'] + 1;
}
$ret = $conn->execScript('UPDATE user SET game_times=:game_times, win_times=:win_times, kills=:kills, harm=:harm, add_HP=:add_HP, alive_time=:alive_time, kill_his=:kill_his, alive_time_his=:alive_time_his, harm_his=:harm_his, add_HP_his=:add_HP_his, coin_num=:coin_num, integral=:integral, modify_time=:modify_time, first_fight=1, box_num=:box_num ' .
' WHERE accountid=:accountid;', ' WHERE accountid=:accountid;',
array( array(
':game_times' => $row['game_times'] + 1, ':game_times' => $row['game_times'] + 1,
@ -230,7 +236,8 @@ class RoleController{
':accountid' => $account_id, ':accountid' => $account_id,
':coin_num' => $row['coin_num'] + $coin_num, ':coin_num' => $row['coin_num'] + $coin_num,
':integral' => $row['integral'] + $integral, ':integral' => $row['integral'] + $integral,
':modify_time' => time() ':modify_time' => time(),
':box_num' => $box_num
)); ));
if (!$ret) { if (!$ret) {
die(); die();
@ -291,8 +298,9 @@ class RoleController{
} }
} }
//额外奖励 //额外奖励
$times = $this->getRewardTimes($coin_num); $p = $this->getParameter(REWARD_TIMES);
$extra_coin = $coin_num * ($times - 1); $times = $p['param_value'] - 1;
$extra_coin = $coin_num * $times;
$d = $this->getDrop(24004); $d = $this->getDrop(24004);
if (!$d) { if (!$d) {
phpcommon\sendError(ERR_USER_BASE + 3, '没有这个奖励'); phpcommon\sendError(ERR_USER_BASE + 3, '没有这个奖励');
@ -325,6 +333,7 @@ class RoleController{
} else { } else {
$extra_drop = '10001:' . $extra_coin . '|10002:1' . '|' . $skin_id . ':' . $skin_num; $extra_drop = '10001:' . $extra_coin . '|10002:1' . '|' . $skin_id . ':' . $skin_num;
} }
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
'errmsg' => '', 'errmsg' => '',
@ -465,8 +474,9 @@ class RoleController{
return; return;
} }
$coin_num = $row['coin']; $coin_num = $row['coin'];
$times = $this->getRewardTimes($coin_num); $p = $this->getParameter(REWARD_TIMES);
$coin_num = $row['coin'] * ($times - 1); $times = $p['param_value'] - 1;
$coin_num = $row['coin'] * $times;
$d = $this->getDrop(24004); $d = $this->getDrop(24004);
if (!$d) { if (!$d) {
phpcommon\sendError(ERR_USER_BASE + 3, '没有这个奖励'); phpcommon\sendError(ERR_USER_BASE + 3, '没有这个奖励');
@ -522,22 +532,6 @@ class RoleController{
)); ));
} }
protected function getRewardTimes($coin_num)
{
$g_conf_reward_cluster = require('../res/rewardTimes@rewardTimes.php');
$times = 1;
$reward_conf = array();
for ($i = 0; $i < 4; $i++) {
$reward_id = $i + 91100;
$reward_conf = getRewardTimesConfig($g_conf_reward_cluster, $reward_id);
if ((int)$coin_num >= $reward_conf['minGold'] && (int)$coin_num <= $reward_conf['maxGold']) {
$times = $reward_conf['times'];
break;
}
}
return $times;
}
public function collectReward() public function collectReward()
{ {
$account_id = $_REQUEST['account_id']; $account_id = $_REQUEST['account_id'];
@ -618,12 +612,14 @@ class RoleController{
$weight_array = $this->getExplode($d['weight']); $weight_array = $this->getExplode($d['weight']);
$i = 0; $i = 0;
$item_list = array(); $item_list = array();
$p = $this->getParameter(REWARD_TIMES);
$times = $p['param_value'] - 1;
foreach ($weight_array as $item) { foreach ($weight_array as $item) {
if ($item[$i][0] >= Rand(0, 10000)) { if ($item[$i][0] >= Rand(0, 10000)) {
$item_id = $item_id_array[$i][0]; $item_id = $item_id_array[$i][0];
$item_num = $num_array[$i][0]; $item_num = $num_array[$i][0];
$addreward = new classes\AddReward(); $addreward = new classes\AddReward();
$addreward->addReward($item_id, $item_num, $account_id); $addreward->addReward($item_id, $item_num * $times, $account_id);
} }
$i++; $i++;
} }
@ -632,5 +628,68 @@ class RoleController{
'errmsg' => '', 'errmsg' => '',
)); ));
} }
public function getPreSettlementInfo()
{
$account_id = $_REQUEST['account_id'];
//登录校验
$login = loginVerify($account_id, $_REQUEST['session_id']);
if (!$login) {
phpcommon\sendError(ERR_USER_BASE + 1, 'session无效');
return;
}
$conn = $this->getMysql($account_id);
$pre_settlement_info = '';
if (!$conn) {
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
return;
}
echo json_encode(array(
'errcode' => 0,
'errmsg' => '',
'pre_settlement_info' => $pre_settlement_info
));
}
public function getRobotInfo()
{
$account_id = $_REQUEST['account_id'];
//登录校验
$login = loginVerify($account_id, $_REQUEST['session_id']);
if (!$login) {
phpcommon\sendError(ERR_USER_BASE + 1, 'session无效');
return;
}
$member_list = array();
for ($i = 1; $i <= 100; $i++) {
$num = 1;
$robot_id = 1000 + $i;
$rob = $this->getRobot($robot_id, $num);
array_push ($member_list, array(
'account_id' => $rob['id'],
'name' => $rob['name'],
'avatar_url' => $rob['avatar_url'],
));
}
echo json_encode(array(
'errcode' => 0,
'errmsg' => '',
'member_list' => $member_list
));
}
protected function getRobot($robot_id, $num)
{
$address = '../res/robot@robot' . $num . '.php';
$robot_meta_cluster = require($address);
$robot_meta = getRobotConfig($robot_meta_cluster, $robot_id);
$rob = array(
'id' => $robot_meta['id'],
'name' => $robot_meta['name'],
'avatar_url' => $robot_meta['avatar_url'],
'sex' => $robot_meta['sex']
);
return $rob;
}
} }
?> ?>

View File

@ -130,7 +130,8 @@ class ShareController{
for ($i = 0; $i < count($weight_array); $i++) { for ($i = 0; $i < count($weight_array); $i++) {
$weight_sum += $weight_array[$i][0]; $weight_sum += $weight_array[$i][0];
} }
srand(crc32($account_id . $row['keys_num'])); $keys = $row['keys_num'] - 1;
srand(crc32($account_id . $keys));
$random = Rand(0, $weight_sum); $random = Rand(0, $weight_sum);
$weight = 0; $weight = 0;
for ($i = 0; $i < count($weight_array); $i++) { for ($i = 0; $i < count($weight_array); $i++) {
@ -162,6 +163,7 @@ class ShareController{
public function keyBoxReward() public function keyBoxReward()
{ {
error_log('keyBoxReward');
$account_id = $_REQUEST['account_id']; $account_id = $_REQUEST['account_id'];
//登录校验 //登录校验
$login = loginVerify($account_id, $_REQUEST['session_id']); $login = loginVerify($account_id, $_REQUEST['session_id']);
@ -174,6 +176,7 @@ class ShareController{
phpcommon\sendError(ERR_USER_BASE + 2, '没有这个玩家'); phpcommon\sendError(ERR_USER_BASE + 2, '没有这个玩家');
return; return;
} }
$double = $_REQUEST['double'];
$row = $conn->execQueryOne('SELECT keys_num FROM user WHERE accountid=:accountid;', $row = $conn->execQueryOne('SELECT keys_num FROM user WHERE accountid=:accountid;',
array( array(
':accountid' => $account_id ':accountid' => $account_id
@ -183,6 +186,12 @@ class ShareController{
return; return;
} }
//随机奖励 //随机奖励
$p = $this->getParameter(REWARD_TIMES);
$times = 1;
if ($double == 1) {
$times = $p['param_value'] - 1;
}
$free = $_REQUEST['free']; $free = $_REQUEST['free'];
$drop_id = 0; $drop_id = 0;
if ($free != 0) { if ($free != 0) {
@ -216,7 +225,7 @@ class ShareController{
$item_id = $item_id_array[$keys][0]; $item_id = $item_id_array[$keys][0];
$item_num = $item_num_array[$keys][0]; $item_num = $item_num_array[$keys][0];
$addreward = new classes\AddReward(); $addreward = new classes\AddReward();
$addreward->addReward($item_id, $item_num, $account_id); $addreward->addReward($item_id, $item_num * $times, $account_id);
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
'errmsg' => '', 'errmsg' => '',
@ -369,7 +378,7 @@ class ShareController{
)); ));
} }
public function shareDoubleReward() public function shareDobleReward()
{ {
$account_id = $_REQUEST['account_id']; $account_id = $_REQUEST['account_id'];
//登录校验 //登录校验
@ -411,8 +420,10 @@ class ShareController{
return; return;
} }
$array = $this->getExplode($sh['rewards']); $array = $this->getExplode($sh['rewards']);
$p = $this->getParameter(REWARD_TIMES);
$times = $p['param_value'] - 1;
$addreward = new classes\AddReward(); $addreward = new classes\AddReward();
$addreward->addReward($array[0][0], $array[0][1], $account_id); $addreward->addReward($array[0][0], $array[0][1] * $times, $account_id);
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
'errmsg' => '', 'errmsg' => '',
@ -540,8 +551,10 @@ class ShareController{
} }
$item_id = $item_id_array[$keys][0]; $item_id = $item_id_array[$keys][0];
$item_num = $item_num_array[$keys][0]; $item_num = $item_num_array[$keys][0];
$p = $this->getParameter(REWARD_TIMES);
$times = $p['param_value'] - 1;
$addreward = new classes\AddReward(); $addreward = new classes\AddReward();
$addreward->addReward($item_id, $item_num, $account_id); $addreward->addReward($item_id, $item_num * $times, $account_id);
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
'errmsg' => '', 'errmsg' => '',

View File

@ -211,6 +211,61 @@ class ShopController{
)); ));
} }
public function buyDoubleItem()
{
$account_id = $_REQUEST['account_id'];
//登录校验
$login = loginVerify($account_id, $_REQUEST['session_id']);
if (!$login) {
phpcommon\sendError(ERR_USER_BASE + 1, 'session无效');
return;
}
$shop_id = $_REQUEST['shop_id'];
$shop_uuid = $_REQUEST['shop_uuid'];
$item_id = 0;
$item_num = 0;
$price = 0;
$status = 0;
$flag = 0;
$r = $this->getRedis($shop_uuid);
$user_db_str = $r->get($shop_uuid);
if (empty($user_db_str)) {
phpcommon\sendError(ERR_USER_BASE + 1,'session失效');
return;
}
$user_db = json_decode($user_db_str, true);
if (empty($user_db)) {
phpcommon\sendError(ERR_USER_BASE + 1,'session失效');
return;
}
foreach ($user_db['shop_list'] as $shop) {
if ($shop['shop_id'] == $shop_id) {
$item_id = $shop['item_id'];
$item_num = $shop['item_num'];
$price = $shop['price'];
$status = $shop['status'];
$flag = 1;
break;
}
}
if ($flag == 0) {
phpcommon\sendError(ERR_USER_BASE + 3, '没有这个商品');
return;
}
//增加奖励
$p = $this->getParameter(REWARD_TIMES);
$times = $p['param_value'] - 1;
$addreward = new classes\AddReward();
$addreward->addReward($item_id, $item_num * $times, $account_id);
echo json_encode(array(
'errcode' => 0,
'errmsg'=> '',
));
}
public function flushShop() public function flushShop()
{ {
$account_id = $_REQUEST['account_id']; $account_id = $_REQUEST['account_id'];
@ -314,8 +369,8 @@ class ShopController{
//确定折扣和价格 //确定折扣和价格
$it = $this->getItem($item_id); $it = $this->getItem($item_id);
if ($s['tip'] != 3) { if ($s['tip'] != 3) {
$discount = $s['discount']; $discount = 0;
$price = $it['price']; $price = 0;
} else { } else {
$keys = 0; $keys = 0;
$weight_sum = 0; $weight_sum = 0;

View File

@ -88,7 +88,7 @@ class SignController{
return; return;
} }
$conn = $this->getMysql($account_id); $conn = $this->getMysql($account_id);
$sign_days = 0; $last_sign_id = 0;
if (!$conn) { if (!$conn) {
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家'); phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
return; return;
@ -100,30 +100,29 @@ class SignController{
)); ));
$nowTime = phpcommon\getdayseconds(time()); $nowTime = phpcommon\getdayseconds(time());
if (!$rows) { if (!$rows) {
$sign_days = 1; $last_sign_id = 1;
//插入签到列表 //插入签到列表
$this->insertSign($account_id, $sign_days); $this->insertSign($account_id, $last_sign_id);
//更新签到总天数 //更新签到总天数
$this->updateSignSum($account_id, $sign_days); $this->updateSignSum($account_id, $last_sign_id);
//完成签到任务 //完成签到任务
$quest = new classes\Quest(); $quest = new classes\Quest();
$quest->triggerQuest(QUEST_DAY_LOGIN, 1, 1, $account_id); $quest->triggerQuest(QUEST_DAY_LOGIN, 1, 1, $account_id);
$quest->triggerQuest(QUEST_SUM_LOGIN, 2, 1, $account_id); $quest->triggerQuest(QUEST_SUM_LOGIN, 2, 1, $account_id);
} else { } else {
$sign_time = 0; $last_sign_time = 0;
foreach ($rows as $row) { foreach ($rows as $row) {
if ($row['sign_time'] > $sign_time) { if ($row['sign_id'] > $last_sign_id) {
$sign_time = $row['sign_time']; $last_sign_time = $row['sign_time'];
$sign_days = $row['sign_id']; $last_sign_id = $row['sign_id'];
} }
} }
if ($nowTime - phpcommon\getdayseconds($sign_time) > 0) { if ($nowTime - phpcommon\getdayseconds($last_sign_time) > 0) {
//每日刷新 //每日刷新
error_log($sign_days);
$this->updateDaily($account_id); $this->updateDaily($account_id);
$sign_num = floor(($nowTime - phpcommon\getdayseconds($sign_time)) / (3600 * 24)); $passed_days = floor(($nowTime - phpcommon\getdayseconds($last_sign_time)) / (3600 * 24));
if ($sign_num > 7 - $sign_days) { if ($passed_days > 7 - $last_sign_id) {
//每周更新一次 //跨周时删除老数据
$ret = $conn->execScript('DELETE from sign WHERE accountid=:accountid;', $ret = $conn->execScript('DELETE from sign WHERE accountid=:accountid;',
array( array(
':accountid' => $account_id, ':accountid' => $account_id,
@ -132,20 +131,19 @@ class SignController{
die(); die();
return; return;
} }
$num = ($sign_num - 7 + $sign_days) % 7; $num = ($passed_days - 7 + $last_sign_id) % 7;
for ($i = $sign_days + 1; $i < $num + $sign_days + 1; $i++) { for ($i = $last_sign_id + 1; $i < $num + $last_sign_id + 1; $i++) {
//插入补签列表 //插入补签列表
$this->insertSign($account_id, $i); $this->insertSign($account_id, $i);
} }
} else { } else {
error_log($sign_num); for ($i = $last_sign_id + 1; $i < $passed_days + $last_sign_id + 1; $i++) {
for ($i = $sign_days + 1; $i < $sign_num + $sign_days + 1; $i++) {
//插入补签列表 //插入补签列表
$this->insertSign($account_id, $i); $this->insertSign($account_id, $i);
} }
} }
//更新签到总天数 //更新签到总天数
$this->updateSignSum($account_id, $sign_num); $this->updateSignSum($account_id, $passed_days);
//完成签到任务 //完成签到任务
$quest = new classes\Quest(); $quest = new classes\Quest();
$quest->triggerQuest(QUEST_DAY_LOGIN, 1, 1, $account_id); $quest->triggerQuest(QUEST_DAY_LOGIN, 1, 1, $account_id);
@ -224,9 +222,10 @@ class SignController{
$s = $this->getSign($day + 90000); $s = $this->getSign($day + 90000);
$item_id = $s['item_id']; $item_id = $s['item_id'];
$num = $s['num']; $num = $s['num'];
$p = $this->getParameter(REWARD_TIMES);
$times = $p['param_value'];
if ($double == 1) { if ($double == 1) {
$p_gold = $this->getParameter(DOUBLE_SIGN_IN); $num = $num * $times;
$num = $num * $p_gold['param_value'];
} }
$addreward = new classes\AddReward(); $addreward = new classes\AddReward();
$addreward->addReward($item_id, $num, $account_id); $addreward->addReward($item_id, $num, $account_id);

View File

@ -342,33 +342,9 @@ class SkinController{
die(); die();
return; return;
} }
/*$skin_list = array();
array_push($skin_list, array(
'skin_id' => $row['skin_id'],
'skin_status' => $skin_status,
'fragment_num' => $row['fragment_num'],
'active_time' => $row['active_time'],
'skin_level' => $row['skin_level'],
'skin_experience_type' => $row['skin_experience_type']
));
$row_exchange = $conn->execQueryOne('SELECT * FROM skin WHERE accountid=:accountid AND skin_id=:skin_id;',
array(
':accountid' => $account_id,
':skin_id' => $exchangeskin_id,
));
array_push($skin_list, array(
'skin_id' => $row_exchange['skin_id'],
'skin_status' => 0,
'fragment_num' => $row_exchange['fragment_num'],
'active_time' => $row_exchange['active_time'],
'skin_level' => $row_exchange['skin_level'],
'skin_experience_type' => $row_exchange['skin_experience_type']
));
*/
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
'errmsg' => '', 'errmsg' => '',
//"skin_list" => $skin_list,
)); ));
} }
@ -383,15 +359,6 @@ class SkinController{
} }
$conn = $this->getMysql($account_id); $conn = $this->getMysql($account_id);
$skin_id = $_REQUEST['skin_id']; $skin_id = $_REQUEST['skin_id'];
$row = $conn->execQueryOne('SELECT * FROM skin WHERE accountid=:accountid AND skin_id=:skin_id;',
array(
':accountid' => $account_id,
':skin_id' => $skin_id,
));
if (!$row) {
phpcommon\sendError(ERR_USER_BASE + 1,'没有这个角色');
return;
}
if(!$conn){ if(!$conn){
phpcommon\sendError(ERR_USER_BASE + 1,'没有这个角色'); phpcommon\sendError(ERR_USER_BASE + 1,'没有这个角色');
return; return;
@ -401,6 +368,34 @@ class SkinController{
phpcommon\sendError(ERR_USER_BASE + 2,'没有这个皮肤'); phpcommon\sendError(ERR_USER_BASE + 2,'没有这个皮肤');
return; return;
} }
$rowSkin = $conn->execQueryOne('SELECT * FROM skin WHERE accountid=:accountid AND skin_id=:skin_id;',
array(
':accountid' => $account_id,
':skin_id' => $skin_id,
));
if (!$rowSkin) {
$ret = $conn->execScript('INSERT INTO skin(accountid, skin_id, skin_status, fragment_id, fragment_num, active_time, fragment_status, skin_type, skin_level, skin_experience_level, skin_experience_type, create_time, modify_time) ' .
' VALUES(:account_id, :skin_id, :skin_status, :fragment_id, 0, 0, 0, :skin_type, 1, 0, 0, :create_time, :modify_time) ' .
' ON DUPLICATE KEY UPDATE accountid=:account_id, skin_id=:skin_id, skin_status=:skin_status, fragment_id=:fragment_id, fragment_num=0, active_time=0, fragment_status=0, skin_type=:skin_type, skin_level=1, skin_experience_level=0, skin_experience_type=0, modify_time=:modify_time;',
array(
':account_id' => $account_id,
':skin_id' => $skin_id,
':skin_status' => 2,
':fragment_id' => $skin_id - 1000,
':skin_type' => 1,
':create_time' => time(),
':modify_time' => time()
));
if(!$ret){
die();
return;
}
}
$row = $conn->execQueryOne('SELECT * FROM skin WHERE accountid=:accountid AND skin_id=:skin_id;',
array(
':accountid' => $account_id,
':skin_id' => $skin_id,
));
$time = 0; $time = 0;
$ex_level = 0; $ex_level = 0;
$ex_type = 0; $ex_type = 0;
@ -432,12 +427,6 @@ class SkinController{
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
'errmsg' => '', 'errmsg' => '',
/*'skin_id' => $row['skin_id'],
'skin_status' => $row['skin_status'],
'fragment_num' => $row['fragment_num'],
'active_time' => time() + $time,
'skin_level' => $ex_level,
'skin_experience_type' => 2*/
)); ));
} }
@ -499,12 +488,6 @@ class SkinController{
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
'errmsg' => '', 'errmsg' => '',
/*'skin_id' => $row['skin_id'],
'skin_status' => $row['skin_status'],
'fragment_num' => $row['fragment_num'] - $debris_num,
'active_time' => $row['active_time'],
'skin_level' => $row['skin_level'] + 1,
'skin_experience_type' => $row['skin_experience_type']*/
)); ));
} }
} }

View File

@ -93,7 +93,7 @@ class TeamController{
$user_db_str = $r->get(TEAMID_KEY.$team_uuid); $user_db_str = $r->get(TEAMID_KEY.$team_uuid);
error_log($team_uuid);
if (empty($user_db_str)) { if (empty($user_db_str)) {
phpcommon\sendError(ERR_USER_BASE + 1,'session失效1'); phpcommon\sendError(ERR_USER_BASE + 1,'session失效1');
return; return;