fix
This commit is contained in:
parent
b45ff3a35c
commit
ccf9bf261a
@ -442,18 +442,18 @@ class ActivityController{
|
||||
}
|
||||
|
||||
if ($cur_cost > 0) {
|
||||
$row = $conn->execQueryOne(
|
||||
$userrow = $conn->execQueryOne(
|
||||
'SELECT diamond_num, first_gift, free_coin, free_diamond FROM user WHERE accountid=:accountid;',
|
||||
array(
|
||||
':accountid' => $account_id
|
||||
)
|
||||
);
|
||||
if (!$row) {
|
||||
if (!$userrow) {
|
||||
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
||||
return;
|
||||
}
|
||||
//扣除钻石
|
||||
if ($row['diamond_num'] < $cur_cost) {
|
||||
if ($userrow['diamond_num'] < $cur_cost) {
|
||||
phpcommon\sendError(ERR_USER_BASE + 3, '钻石不足');
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user