1
This commit is contained in:
parent
876c7718be
commit
b408be64c8
@ -218,7 +218,6 @@ class ActivityController{
|
||||
}
|
||||
case 2: //活动皮肤兑换
|
||||
{
|
||||
var_dump(time());
|
||||
$arr = $this->getExplode($act['exchange_item']);
|
||||
$row = $conn->execQueryOne('SELECT * FROM skin WHERE accountid = :account_id AND skin_id = :skin_id;',
|
||||
array(
|
||||
|
@ -121,7 +121,12 @@ class HangController{
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
$num = time() - $row['hang_time'];
|
||||
$p_num = $this->getParameter(GOLD);
|
||||
$p_time_limit = $this->getParameter(TIME_LIMIT);
|
||||
$num = time() - $row['hang_time'] / 5 * $p_num['param_value'];
|
||||
if ($num >= $p_time_limit['param_value']) {
|
||||
$num = $p_time_limit['param_value'] / 5 * $p_num['param_value'];
|
||||
}
|
||||
}
|
||||
|
||||
echo json_encode(array(
|
||||
|
@ -169,7 +169,10 @@ class RoleController{
|
||||
array(
|
||||
':accountid' => $account_id
|
||||
));
|
||||
if ($row) {
|
||||
if (!$row) {
|
||||
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
||||
return;
|
||||
}
|
||||
if ($kill_his < $row['kill_his']) {
|
||||
$kill_his = $row['kill_his'];
|
||||
}
|
||||
@ -206,7 +209,7 @@ class RoleController{
|
||||
die();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//插入历史记录
|
||||
$ret = $conn->execScript('INSERT INTO history_record(accountid, room_uuid, map_name, game_time, rank, kills, harms, hurts, alive_time, coin, status) ' .
|
||||
' VALUES(:accountid, :room_uuid, :map_name, :game_time, :rank, :kills, :harms, :hurts, :alive_time, :coin, 0);',
|
||||
|
@ -152,10 +152,11 @@ class SupplyBoxController{
|
||||
':accountid' => $account_id,
|
||||
':box_id' => $box_id
|
||||
));
|
||||
if (!$row && $free_open == 0) {
|
||||
if (!$row) {
|
||||
if ($free_open == 0) {
|
||||
phpcommon\sendError(ERR_USER_BASE + 2, '没有这个宝箱');
|
||||
return;
|
||||
} else if (!$row && $free_open == 1) {
|
||||
} else if ($free_open == 1) {
|
||||
$ret = $conn->execScript('INSERT INTO supplybox(accountid, box_id, box_num, buy_times, last_buy_time) ' .
|
||||
' VALUES(:accountid, :box_id, 0, 0, 0);',
|
||||
array(
|
||||
@ -167,6 +168,7 @@ class SupplyBoxController{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($free_open == 0) {
|
||||
if ($row['box_num'] <= 0) {
|
||||
phpcommon\sendError(ERR_USER_BASE + 3, '宝箱数量不足');
|
||||
|
Loading…
x
Reference in New Issue
Block a user