拍卖行:军团拍卖阶段仅有军团成员可以出价
This commit is contained in:
@@ -43,6 +43,7 @@ export class AuctionHandler {
|
||||
const roleName = session.get('roleName');
|
||||
const sid = session.get('sid');
|
||||
const serverId = session.get('serverId');
|
||||
const guildCode = session.get('guildCode');
|
||||
let res: any = await lockData(serverId, DATA_NAME.AUCTION_LOT, code);// 加锁
|
||||
|
||||
try {
|
||||
@@ -56,6 +57,11 @@ export class AuctionHandler {
|
||||
return resResult(STATUS.GUILD_LOT_NOT_FOUND);
|
||||
}
|
||||
|
||||
const stage = auctionStage();
|
||||
if (stage === AUCTION_STAGE.GUILD && lot.guildCode !== guildCode) {
|
||||
return resResult(STATUS.AUCTION_GUILD_MEMBER_ONLY);
|
||||
}
|
||||
|
||||
const { curBuyer, curPrice, maxPrice, gid, count, bidRoles, watchingRoles } = lot;
|
||||
if (curBuyer === roleId) {
|
||||
res.releaseCallback();
|
||||
@@ -89,7 +95,7 @@ export class AuctionHandler {
|
||||
|
||||
const incPrice = newPrice - (curBuyer ? curPrice : 0);
|
||||
let newDividend = null;
|
||||
if (auctionStage() === AUCTION_STAGE.GUILD) {
|
||||
if (stage === AUCTION_STAGE.GUILD) {
|
||||
const dividend = await DividendModel.updateLot(code, gid, newPrice, incPrice, max);
|
||||
newDividend = await calculateDividend(dividend);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user