✨ feat(兼容): 配表使用后台隐藏物品
This commit is contained in:
@@ -4,7 +4,7 @@ import { AUCTION_STAGE, DEBUG_MAGIC_WORD, STATUS, CURRENCY_BY_TYPE, CURRENCY_TYP
|
||||
import { LotModel } from "../../../db/Lot";
|
||||
import { ItemReward } from "../../../domain/dbGeneral";
|
||||
import { genCode, resResult } from "../../../pubUtils/util";
|
||||
import { auctionStage, calculateDividend, genAuction, sendUngotDividend, startGuildAuction, startWorldAuction, stopAuction, todayGuildBegin, getBasePrice, debugAuctionLots, officialAuctionLots, auctionBidStatus, getMaxPrice, guildBidStatus, getAuction, pushAuctionOver, pushAuctionUpdate, checkAuctionStage, processDividendFormat, processSingleDividendFormat, tomorrowGuildBegin, processLotsFormat, processSingleLotFormat } from "../../../services/auctionService";
|
||||
import { auctionStage, calculateDividend, genAuction, sendUngotDividend, startGuildAuction, startWorldAuction, stopAuction, todayGuildBegin, getBasePrice, debugAuctionLots, officialAuctionLots, auctionBidStatus, getMaxPrice, guildBidStatus, getAuction, pushAuctionOver, pushAuctionUpdate, checkAuctionStage, processDividendFormat, processSingleDividendFormat, tomorrowGuildBegin, processLotsFormat, processSingleLotFormat, getAuctionRewardByPoolId } from "../../../services/auctionService";
|
||||
import { addItems, getGoldObject, handleCost } from '../../../services/role/rewardService';
|
||||
import { getSimpleRoleInfo } from '../../../services/roleService';
|
||||
import { getRoleOnlineInfo } from '../../../services/redisService';
|
||||
@@ -16,7 +16,7 @@ import { unlockTrain } from '../../../services/guildTrainService';
|
||||
import { UserGuildModel } from '../../../db/UserGuild';
|
||||
import { UserGuildApplyModel } from '../../../db/UserGuildApply';
|
||||
import * as dicParam from '../../../pubUtils/dicParam';
|
||||
import { gameData, getAuctionRewardByPoolId } from '../../../pubUtils/data';
|
||||
import { gameData } from '../../../pubUtils/data';
|
||||
import { sendMailByContent } from '../../../services/mailService';
|
||||
import { reportTAEvent } from '../../../services/sdkService';
|
||||
import { sendMessageToGuildWithSuc, sendMessageToServerWithSuc } from '../../../services/pushService';
|
||||
|
||||
@@ -11,7 +11,7 @@ import { DATA_NAME } from '../../../consts/dataName';
|
||||
import { UserGuildModel } from '../../../db/UserGuild';
|
||||
import { addActive } from '../../../services/guildService';
|
||||
import { GuildModel } from '../../../db/Guild';
|
||||
import { gameData, getAuctionRewardByPoolId, getBossByLv } from '../../../pubUtils/data';
|
||||
import { gameData, getBossByLv } from '../../../pubUtils/data';
|
||||
import { lockData } from '../../../services/redLockService';
|
||||
import { pushGuildBossSucMsg, getGuildChannelSid } from '../../../services/chatService';
|
||||
import { checkTask } from '../../../services/task/taskService';
|
||||
@@ -20,7 +20,7 @@ import { addItems, getGoldObject, handleCost } from '../../../services/role/rewa
|
||||
import * as dicParam from '../../../pubUtils/dicParam';
|
||||
import { RoleModel } from '../../../db/Role';
|
||||
import { sendMailToGuildByContent } from '../../../services/mailService';
|
||||
import { genAuction } from '../../../services/auctionService';
|
||||
import { genAuction, getAuctionRewardByPoolId } from '../../../services/auctionService';
|
||||
import { sendMessageToGuildWithSuc } from '../../../services/pushService';
|
||||
|
||||
export default function (app: Application) {
|
||||
|
||||
@@ -16,6 +16,7 @@ import { ARMY } from '../../../pubUtils/dicParam';
|
||||
import { guildInter } from '../../../pubUtils/interface';
|
||||
import { getSeconds, getZeroPoint, nowSeconds } from '../../../pubUtils/timeUtil';
|
||||
import { sendMessageToUserWithSuc } from '../../../services/pushService';
|
||||
import { isGoodsHidden } from '../../../services/dataService';
|
||||
export default function(app: Application) {
|
||||
return new WishPoolHandler(app);
|
||||
}
|
||||
@@ -39,6 +40,8 @@ export class WishPoolHandler {
|
||||
const { goodId, type, myUserGuild } = msg;
|
||||
const roleId: string = session.get('roleId');
|
||||
const serverId: number = parseInt(session.get('serverId'));
|
||||
|
||||
if(isGoodsHidden(goodId)) return resResult(STATUS.ITEM_IS_HIDDEN);
|
||||
let dicGoods = getGoodById(goodId)
|
||||
if (!dicGoods) return resResult(STATUS.DIC_DATA_NOT_FOUND);
|
||||
let dicItid = ITID.get(dicGoods.itid);
|
||||
@@ -101,6 +104,8 @@ export class WishPoolHandler {
|
||||
if (wishGood.receiveCnt >= wishGood.count)
|
||||
return resResult(STATUS.HAS_RECEIVE_WISH_GOOD);//已经收到
|
||||
|
||||
if(isGoodsHidden(wishGood.goodId)) return resResult(STATUS.ITEM_IS_HIDDEN);
|
||||
|
||||
let dicWishReward = getWishPoolReward(wishGood.goodId);
|
||||
if(!dicWishReward) return resResult(STATUS.DIC_DATA_NOT_FOUND);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import { taflush, treatGuildName } from '../../../services/sdkService';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { errlogger } from '../../../util/logger';
|
||||
import { setApiIsClose } from '../../../services/chatService';
|
||||
import { setHiddenData } from '../../../services/dataService';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -74,4 +75,12 @@ export class GuildRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setHiddenData(heroes: number[], goods: number[], refTime: number) {
|
||||
try {
|
||||
setHiddenData(heroes, goods, refTime);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user