1
This commit is contained in:
parent
cd2632ba19
commit
08243371f3
@ -179,7 +179,7 @@ class PassController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
array_push($item_list, array(
|
array_push($item_list, array(
|
||||||
'id' => $id,
|
'id' => $id - 1,
|
||||||
'type' => $t,
|
'type' => $t,
|
||||||
'point' => $seaReward['point'],
|
'point' => $seaReward['point'],
|
||||||
'item_id' => $drop_multiply[0],
|
'item_id' => $drop_multiply[0],
|
||||||
|
@ -526,6 +526,14 @@ class PayController{
|
|||||||
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$row = $conn->execQueryOne('SELECT diamond_num, first_gift FROM user WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id
|
||||||
|
));
|
||||||
|
if (!$row) {
|
||||||
|
phpcommon\sendError(ERR_USER_BASE + 2, '没有这个玩家');
|
||||||
|
return;
|
||||||
|
}
|
||||||
$item_id = $_REQUEST['item_id'];
|
$item_id = $_REQUEST['item_id'];
|
||||||
$item_list = array();
|
$item_list = array();
|
||||||
$diamond_meta_table = require('../res/diamondshop@diamondshop.php');
|
$diamond_meta_table = require('../res/diamondshop@diamondshop.php');
|
||||||
@ -542,14 +550,6 @@ class PayController{
|
|||||||
}
|
}
|
||||||
if ($diamond['coin_type'] == 10003) {
|
if ($diamond['coin_type'] == 10003) {
|
||||||
//扣除钻石
|
//扣除钻石
|
||||||
$row = $conn->execQueryOne('SELECT diamond_num FROM user WHERE accountid=:accountid;',
|
|
||||||
array(
|
|
||||||
':accountid' => $account_id
|
|
||||||
));
|
|
||||||
if (!$row) {
|
|
||||||
phpcommon\sendError(ERR_USER_BASE + 2, '没有这个玩家');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ($row['diamond_num'] < $diamond['coin_num']) {
|
if ($row['diamond_num'] < $diamond['coin_num']) {
|
||||||
phpcommon\sendError(ERR_USER_BASE + 3, '钻石不足');
|
phpcommon\sendError(ERR_USER_BASE + 3, '钻石不足');
|
||||||
return;
|
return;
|
||||||
@ -566,6 +566,23 @@ class PayController{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//首充礼包奖励
|
||||||
|
if ($diamond['shop_type'] == 4) {
|
||||||
|
if ($row['first_gift'] == 1) {
|
||||||
|
phpcommon\sendError(ERR_USER_BASE + 4, '首充礼包已领取');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$ret = $conn->execScript('UPDATE user SET first_gift=1, modify_time=:modify_time ' .
|
||||||
|
' WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id,
|
||||||
|
':modify_time' => time()
|
||||||
|
));
|
||||||
|
if (!$ret) {
|
||||||
|
die();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//添加道具
|
//添加道具
|
||||||
|
@ -362,6 +362,8 @@ class SignController{
|
|||||||
if (!$share_ret) {
|
if (!$share_ret) {
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
//刷新赛季奖励状态
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user