🐞 fix(拍卖行): 世界拍卖行切换问题
This commit is contained in:
@@ -494,29 +494,14 @@ export async function pushAuctionOver(lot: LotType) {
|
||||
}
|
||||
|
||||
export async function pushAuctionUpdate(lots: LotType[], dividends: DividendType[]) {
|
||||
// let lotsByGuild = new Map<string, LotType[]>();
|
||||
// let lotsByServer = new Map<number, LotType[]>();
|
||||
|
||||
// for(let lot of lots) {
|
||||
// if(lot.auctionStage === AUCTION_STAGE.DEFAULT || lot.auctionStage === AUCTION_STAGE.GUILD) {
|
||||
// if(!lotsByGuild.has(lot.guildCode)) {
|
||||
// lotsByGuild.set(lot.guildCode, []);
|
||||
// }
|
||||
// lotsByGuild.get(lot.guildCode).push(lot);
|
||||
// } else {
|
||||
// if(!lotsByServer.has(lot.serverId)) {
|
||||
// lotsByServer.set(lot.serverId, []);
|
||||
// }
|
||||
// lotsByServer.get(lot.serverId).push(lot);
|
||||
// }
|
||||
// }
|
||||
let serverIds: number[] = [];
|
||||
for(let lot of lots) {
|
||||
serverIds.push(lot.serverId);
|
||||
}
|
||||
|
||||
// for(let [guildCode, lots] of lotsByGuild) {
|
||||
// await sendMessageToGuildWithSuc(guildCode, PUSH_ROUTE.AUCTION_UPDATE, { lots: processLotsFormat(lots) });
|
||||
// }
|
||||
// for(let [serverId, lots] of lotsByServer) {
|
||||
// await sendMessageToServerWithSuc(serverId, PUSH_ROUTE.AUCTION_UPDATE, { lots: processLotsFormat(lots) });
|
||||
// }
|
||||
for(let serverId of serverIds) {
|
||||
await sendMessageToServerWithSuc(serverId, PUSH_ROUTE.AUCTION_UPDATE, { });
|
||||
}
|
||||
|
||||
let dividendsResult = new Map<string, DividendType[]>();
|
||||
for(let dividend of dividends) {
|
||||
|
||||
@@ -137,8 +137,7 @@ export async function joinGuild(code: string, guildName: string, lv: number, rol
|
||||
await pinus.app.rpc.connector.connectorRemote.setOtherUserGuildSession.toServer(sid,[{ roleId, userGuild }]);
|
||||
sendMessageToUserWithSuc(roleId, PUSH_ROUTE.MEMBER_JOIN_GUILD, { hasGuild: true, code }, sid);
|
||||
session.set('guildCode', code);
|
||||
let auctionInfo = await getAuction(code, session);
|
||||
sendMessageToUserWithSuc(roleId, PUSH_ROUTE.AUCTION_UPDATE, auctionInfo, sid);
|
||||
sendMessageToUserWithSuc(roleId, PUSH_ROUTE.AUCTION_UPDATE, {}, sid);
|
||||
changeGuildActivity(code, serverId, roleId, sid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user