From 24b65b03955dedc8ec56496fb8e0e3dfc94b4176 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sun, 12 Jun 2022 01:50:33 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B8=88=EC=8C=80=20=EA=B2=BD=EB=A7=A4?= =?UTF-8?q?=EC=9E=A5=EC=97=90=20=EC=B5=9C=EA=B7=BC=20=EB=A1=9C=EA=B7=B8=20?= =?UTF-8?q?=EC=97=86=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/AuctionBasicResource.php | 11 +++++++++-- hwe/ts/components/AuctionResource.vue | 10 +++++++++- hwe/ts/defs/API/Auction.ts | 2 +- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/hwe/sammo/AuctionBasicResource.php b/hwe/sammo/AuctionBasicResource.php index 783d3ff4..c8e025e7 100644 --- a/hwe/sammo/AuctionBasicResource.php +++ b/hwe/sammo/AuctionBasicResource.php @@ -124,6 +124,13 @@ abstract class AuctionBasicResource extends Auction $auctionHost->increaseVar($hostRes->value, $this->info->detail->amount); $auctionHost->applyDB(DB::db()); + if($this->info->hostGeneralID != 0){ + $josaYiHost = JosaUtil::pick($auctionHost->getName(), '이'); + $auctionAmount = $this->info->detail->amount; + $auctionLog = "{$this->auctionID}번 {$hostResName} 경매 유찰 : {$auctionHost->getName()}{$josaYiHost} {$hostResName} {$auctionAmount} 판매, 그러나 입찰자 부재"; + pushAuctionLog($auctionHost->getLogger()->formatText($auctionLog, ActionLogger::EVENT_PLAIN)); + } + $staticNation = $auctionHost->getStaticNation(); $src = new MessageTarget(0, '', 0, 'System', '#000000'); $dest = new MessageTarget( @@ -203,9 +210,9 @@ abstract class AuctionBasicResource extends Auction if ($highestBid->amount === $this->info->detail->finishBidAmount) { - $auctionLog[0] .= ' ★ 즉시구매가 거래 ★'; + $auctionLog[0] .= ' ★ 마감가 거래 ★'; } else if ($highestBid->amount === $this->info->detail->startBidAmount) { - $auctionLog[0] .= " ★ 최고가 거래 ★"; + $auctionLog[0] .= " ★ 최저가 거래 ★"; } pushAuctionLog(array_map( diff --git a/hwe/ts/components/AuctionResource.vue b/hwe/ts/components/AuctionResource.vue index 6fb282ae..c4bb0783 100644 --- a/hwe/ts/components/AuctionResource.vue +++ b/hwe/ts/components/AuctionResource.vue @@ -134,7 +134,7 @@ :max="10000" :step="10" > - +
마감가 ({{ openAuctionInfo.type == "buyRice" ? "금" : "쌀" }}) 등록
+
이전 경매(최근 20건)
+
+ +
+
@@ -160,10 +165,12 @@ import { useToast, BButtonGroup, BButton } from "bootstrap-vue-3"; import { isString } from "lodash"; import { onMounted, reactive, ref, watch } from "vue"; import NumberInputWithInfo from "@/components/NumberInputWithInfo.vue"; +import { formatLog } from "@/utilGame/formatLog"; const toasts = unwrap(useToast()); const buyRice = ref([]); const sellRice = ref([]); +const recentLogs = ref([]); const selectedBuyRiceAuction = ref(undefined); const bidAmountBuyRiceAuction = ref(0); @@ -263,6 +270,7 @@ async function refresh() { const result = await SammoAPI.Auction.GetActiveResourceAuctionList(); buyRice.value = result.buyRice; sellRice.value = result.sellRice; + recentLogs.value = result.recentLogs; } catch (e) { console.error(e); if (isString(e)) { diff --git a/hwe/ts/defs/API/Auction.ts b/hwe/ts/defs/API/Auction.ts index 9043fd69..a84ca72d 100644 --- a/hwe/ts/defs/API/Auction.ts +++ b/hwe/ts/defs/API/Auction.ts @@ -17,7 +17,7 @@ export type BasicResourceAuctionInfo = { amount: number; startBidAmount: number; finishBidAmount: number; - highestBid: BasicResourceAuctionBidder; + highestBid?: BasicResourceAuctionBidder; }; export type UniqueItemAuctionBidder = {