fix: 금쌀 경매장에 최근 로그 없음

This commit is contained in:
2022-06-12 01:50:33 +09:00
parent 2f42691d2b
commit 24b65b0395
3 changed files with 19 additions and 4 deletions
+9 -2
View File
@@ -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} 경매 <M>유찰</> : <Y>{$auctionHost->getName()}</>{$josaYiHost} {$hostResName} <C>{$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] .= ' <M>★ 즉시구매가 거래 ★</>';
$auctionLog[0] .= ' <M>★ 마감가 거래 ★</>';
} else if ($highestBid->amount === $this->info->detail->startBidAmount) {
$auctionLog[0] .= " <R>★ 최가 거래 ★</>";
$auctionLog[0] .= " <R>★ 최가 거래 ★</>";
}
pushAuctionLog(array_map(
+9 -1
View File
@@ -134,7 +134,7 @@
:max="10000"
:step="10"
></NumberInputWithInfo>
</div>
</div>
<div class="col col-md-2">
마감가 ({{ openAuctionInfo.type == "buyRice" ? "금" : "쌀" }})
<NumberInputWithInfo
@@ -149,6 +149,11 @@
<BButton @click="openAuction">등록</BButton>
</div>
</div>
<div>이전 경매(최근 20)</div>
<div v-for="(log, idx) in recentLogs" :key="idx">
<!-- eslint-disable-next-line vue/no-v-html -->
<div v-html="formatLog(log)" />
</div>
</div>
</template>
@@ -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<BasicResourceAuctionInfo[]>([]);
const sellRice = ref<BasicResourceAuctionInfo[]>([]);
const recentLogs = ref<string[]>([]);
const selectedBuyRiceAuction = ref<BasicResourceAuctionInfo | undefined>(undefined);
const bidAmountBuyRiceAuction = ref<number>(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)) {
+1 -1
View File
@@ -17,7 +17,7 @@ export type BasicResourceAuctionInfo = {
amount: number;
startBidAmount: number;
finishBidAmount: number;
highestBid: BasicResourceAuctionBidder;
highestBid?: BasicResourceAuctionBidder;
};
export type UniqueItemAuctionBidder = {