fix: 경매에서 이미 소지 수가 찬 유니크 획득 가능한 문제 수정

This commit is contained in:
2022-06-09 22:28:51 +09:00
parent 120706ef3f
commit f95ee8fab8
+11
View File
@@ -52,6 +52,17 @@ class AuctionUniqueItem extends Auction
return '아직 경매가 끝나지 않았습니다.';
}
$availableCnt = 0;
foreach(GameConst::$allItems as $itemType => $itemList){
$availableCnt += $itemList[$itemKey] ?? 0;
$availableCnt -= $db->queryFirstField('SELECT count(*) FROM `general` WHERE %b = %s', $itemType, $itemKey);
}
if($availableCnt <= 0){
return '그 유니크를 더 얻을 수 없습니다.';
}
$gameStor = KVStorage::getStorage($db, 'game_env');
$now = new DateTimeImmutable();