From 8908e12c5967e6b340f16a184b7c871deea27e1f Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 4 Jan 2022 23:53:57 +0900 Subject: [PATCH] =?UTF-8?q?game:=20=EC=9C=A0=EC=82=B0=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=9E=85=EC=B0=B0=EB=90=9C=20=EC=9C=A0=EB=8B=88=ED=81=AC?= =?UTF-8?q?=EB=8A=94=20=EB=9E=9C=EB=8D=A4=20=EC=9C=A0=EB=8B=88=ED=81=AC?= =?UTF-8?q?=EB=A1=9C=20=EC=96=BB=EC=9D=84=20=EC=88=98=20=EC=97=86=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hwe/func.php b/hwe/func.php index 696af1a8..7421d05d 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1581,6 +1581,18 @@ function giveRandomUniqueItem(General $general, string $acquireType): bool } } + foreach($db->queryAllLists('SELECT namespace, count(*) as cnt FROM `storage` WHERE namespace LIKE "ut_%" GROUP BY namespace') as [$uniqueNS, $cnt]){ + $itemCode = substr($uniqueNS, 3); + $itemClass = buildItemClass($itemCode); + if (!$itemClass) { + continue; + } + if ($itemClass->isBuyable()) { + continue; + } + $occupiedUnique[$itemCode] = ($occupiedUnique[$itemCode]??0) + $cnt; + } + foreach (GameConst::$allItems as $itemType => $itemCategories) { if (key_exists($itemType, $invalidItemType)) { continue;