🐞 fix(拍卖行): 延长竞价有时没有道具问题
This commit is contained in:
@@ -494,29 +494,29 @@ export async function pushAuctionOver(lot: LotType) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function pushAuctionUpdate(lots: LotType[], dividends: DividendType[]) {
|
export async function pushAuctionUpdate(lots: LotType[], dividends: DividendType[]) {
|
||||||
let lotsByGuild = new Map<string, LotType[]>();
|
// let lotsByGuild = new Map<string, LotType[]>();
|
||||||
let lotsByServer = new Map<number, LotType[]>();
|
// let lotsByServer = new Map<number, LotType[]>();
|
||||||
|
|
||||||
for(let lot of lots) {
|
// for(let lot of lots) {
|
||||||
if(lot.auctionStage === AUCTION_STAGE.DEFAULT || lot.auctionStage === AUCTION_STAGE.GUILD) {
|
// if(lot.auctionStage === AUCTION_STAGE.DEFAULT || lot.auctionStage === AUCTION_STAGE.GUILD) {
|
||||||
if(!lotsByGuild.has(lot.guildCode)) {
|
// if(!lotsByGuild.has(lot.guildCode)) {
|
||||||
lotsByGuild.set(lot.guildCode, []);
|
// lotsByGuild.set(lot.guildCode, []);
|
||||||
}
|
// }
|
||||||
lotsByGuild.get(lot.guildCode).push(lot);
|
// lotsByGuild.get(lot.guildCode).push(lot);
|
||||||
} else {
|
// } else {
|
||||||
if(!lotsByServer.has(lot.serverId)) {
|
// if(!lotsByServer.has(lot.serverId)) {
|
||||||
lotsByServer.set(lot.serverId, []);
|
// lotsByServer.set(lot.serverId, []);
|
||||||
}
|
// }
|
||||||
lotsByServer.get(lot.serverId).push(lot);
|
// lotsByServer.get(lot.serverId).push(lot);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
for(let [guildCode, lots] of lotsByGuild) {
|
// for(let [guildCode, lots] of lotsByGuild) {
|
||||||
await sendMessageToGuildWithSuc(guildCode, PUSH_ROUTE.AUCTION_UPDATE, { lots: processLotsFormat(lots) });
|
// await sendMessageToGuildWithSuc(guildCode, PUSH_ROUTE.AUCTION_UPDATE, { lots: processLotsFormat(lots) });
|
||||||
}
|
// }
|
||||||
for(let [serverId, lots] of lotsByServer) {
|
// for(let [serverId, lots] of lotsByServer) {
|
||||||
await sendMessageToServerWithSuc(serverId, PUSH_ROUTE.AUCTION_UPDATE, { lots: processLotsFormat(lots) });
|
// await sendMessageToServerWithSuc(serverId, PUSH_ROUTE.AUCTION_UPDATE, { lots: processLotsFormat(lots) });
|
||||||
}
|
// }
|
||||||
|
|
||||||
let dividendsResult = new Map<string, DividendType[]>();
|
let dividendsResult = new Map<string, DividendType[]>();
|
||||||
for(let dividend of dividends) {
|
for(let dividend of dividends) {
|
||||||
|
|||||||
Reference in New Issue
Block a user