fix: 베팅 순서 수정
This commit is contained in:
@@ -134,6 +134,7 @@ class Bet extends \sammo\BaseAPI
|
|||||||
'amount'=>$amount
|
'amount'=>$amount
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$db->insertUpdate('ng_betting', $bettingItem->toArray());
|
||||||
if($bettingInfo->reqInheritancePoint){
|
if($bettingInfo->reqInheritancePoint){
|
||||||
$inheritStor->setValue('previous', [$remainPoint - $amount, null]);
|
$inheritStor->setValue('previous', [$remainPoint - $amount, null]);
|
||||||
}
|
}
|
||||||
@@ -142,7 +143,6 @@ class Bet extends \sammo\BaseAPI
|
|||||||
'gold' => $db->sqleval('gold - %i', $amount)
|
'gold' => $db->sqleval('gold - %i', $amount)
|
||||||
], 'no = %i', $session->generalID);
|
], 'no = %i', $session->generalID);
|
||||||
}
|
}
|
||||||
$db->insertUpdate('ng_betting', $bettingItem->toArray());
|
|
||||||
if(!$db->affected_rows){
|
if(!$db->affected_rows){
|
||||||
return '베팅을 실패했습니다.';
|
return '베팅을 실패했습니다.';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user