This commit is contained in:
yangduo 2024-12-19 15:09:54 +08:00
parent b45ff3a35c
commit ccf9bf261a

View File

@ -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;
}