diff --git a/hwe/a_bestGeneral.php b/hwe/a_bestGeneral.php index bc2d5e47..69bd6a87 100644 --- a/hwe/a_bestGeneral.php +++ b/hwe/a_bestGeneral.php @@ -2,7 +2,9 @@ namespace sammo; +use Ds\Set; use sammo\Enums\RankColumn; +use sammo\Enums\AuctionType; include "lib.php"; include "func.php"; @@ -19,6 +21,7 @@ $gameStor = KVStorage::getStorage($db, 'game_env'); increaseRefresh("명장일람", 1); $templates = new \League\Plates\Engine(__DIR__ . '/templates'); + ?> @@ -326,6 +329,32 @@ $templates = new \League\Plates\Engine(__DIR__ . '/templates'); } } + + $dummyAuctionGeneral = [ + 'nation' => 0, + 'no' => 0, + 'ownerName' => '', + 'pictureFullPath' => GetImageURL(0) . "/default.jpg", + 'name' => '경매중', + 'bgColor' => '#00582c', + 'fgColor' => 'white', + 'nationName' => '-', + ]; + + foreach ($db->queryFirstColumn( + 'SELECT `target` FROM ng_auction WHERE `finished` = 0 AND `type` = %s', + AuctionType::UniqueItem->value + ) as $itemClassName) { + if(key_exists($itemClassName, $itemOwners)) { + $itemOwners[$itemClassName][] = $dummyAuctionGeneral; + } + else{ + $itemOwners[$itemClassName] = [$dummyAuctionGeneral]; + } + } + + + foreach (GameConst::$allItems as $itemType => $itemList) { $itemNameType = $itemTypes[$itemType]; $itemList = array_reverse($itemList, true);