军团:许愿池捐赠者没有扣除道具
This commit is contained in:
@@ -5,7 +5,7 @@ import { STATUS, GUILD_OPERATE, TASK_TYPE, ITEM_CHANGE_REASON, ITID, CONSUME_TYP
|
||||
import { GuildRefineModel } from '../../../db/GuildRefine';
|
||||
import { gameData, getArmyDevelopConsumeById, getGoodById } from '../../../pubUtils/data';
|
||||
import { nowSeconds } from '../../../pubUtils/timeUtil';
|
||||
import { handleCost, addItems, checkGoods } from '../../../services/role/rewardService';
|
||||
import { handleCost, addItems } from '../../../services/role/rewardService';
|
||||
import { GuildModel } from '../../../db/Guild';
|
||||
import { findIndex, findWhere } from 'underscore';
|
||||
import { lockData } from '../../../services/redLockService';
|
||||
|
||||
@@ -5,7 +5,7 @@ import { WishPoolReportModel } from '../../../db/WishPoolReport';
|
||||
import { resResult, genCode } from '../../../pubUtils/util';
|
||||
import { ITEM_CHANGE_REASON, PUSH_ROUTE, STATUS } from '../../../consts';
|
||||
import { getArmyWishPoolBaseByLv, getGoodById, getWishPoolReward } from '../../../pubUtils/data';
|
||||
import { addItems, checkGoods, checkHeroEquips, checkHeroes, getHonourObject } from '../../../services/role/rewardService';
|
||||
import { addItems, checkGoods, checkHeroEquips, checkHeroes, getHonourObject, handleCost } from '../../../services/role/rewardService';
|
||||
import { ITID, CONSUME_TYPE } from '../../../consts/constModules/itemConst';
|
||||
import { GUILD_STRUCTURE } from '../../../consts/constModules/guildConst';
|
||||
import { refreshUserGuild, getWishPool, getUserGuildWithRefActive } from '../../../services/guildService';
|
||||
@@ -120,6 +120,9 @@ export class WishPoolHandler {
|
||||
let dicWishReward = getWishPoolReward(wishGood.goodId);
|
||||
if(!dicWishReward) return resResult(STATUS.DIC_DATA_NOT_FOUND);
|
||||
|
||||
let costResult = await handleCost(dntRoleId, sid, [{ id: wishGood.goodId, count: 1 }], ITEM_CHANGE_REASON.WISH_POOL_DONATE);
|
||||
if(!costResult) return resResult(STATUS.GUILD_DONATE_CAN_NOT_SEND);
|
||||
|
||||
let { wishDntCnt } = await UserGuildModel.donateGoods(dntRoleId, 1, 'wishDntCnt');
|
||||
let { wishGoods: resWishGoods } = await UserGuildModel.donateUpdate(wishRoleId, dntRoleName, id, 'wishGoods');
|
||||
|
||||
|
||||
@@ -204,6 +204,7 @@ export const STATUS = {
|
||||
GUILD_USER_IS_LEADER: { code: 20933, simStr: '该成员已经是团长' },
|
||||
GUILD_DONATE_LV_NOT_ENOUGH: { code: 20934, simStr: '捐献所等级不足' },
|
||||
GUILD_EQUIP_PRODUCE_LV_NOT_ENOUGH: { code: 20935, simStr: '炼器堂等级不足' },
|
||||
GUILD_DONATE_CAN_NOT_SEND: { code: 20936, simStr: '此物品数量不足,不可捐赠' },
|
||||
|
||||
GUILD_SCRIPT_IS_OPENED_TODAY: { code: 20950, simStr: '今日已开启过演武场' },
|
||||
GUILD_SCRIPT_NOT_OPENED: { code: 20951, simStr: '演武场未开启' },
|
||||
|
||||
Reference in New Issue
Block a user