将魂商店:修改产出
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Application, BackendSession } from "pinus";
|
||||
import { gameData } from "../../../pubUtils/data";
|
||||
import { resResult } from "../../../pubUtils/util";
|
||||
import { parseGoodStr, resResult } from "../../../pubUtils/util";
|
||||
import { STATUS, GUILD_STRUCTURE, ITID, CONSUME_TYPE, HERO_QUALITY_TYPE, HERO_GROW_MAX } from "../../../consts";
|
||||
import { DicShopListModel } from "../../../db/DicShopList";
|
||||
import { UserShopModel } from "../../../db/UserShop";
|
||||
@@ -10,6 +10,7 @@ import { SHOP } from "../../../pubUtils/dicParam";
|
||||
import { getHonourObject } from "../../../pubUtils/itemUtils";
|
||||
import { HeroModel } from "../../../db/Hero";
|
||||
import { getShopListById } from "../../../services/shopService";
|
||||
import { RewardInter } from "../../../pubUtils/interface";
|
||||
|
||||
export default function(app: Application) {
|
||||
return new ShopHandler(app);
|
||||
@@ -122,18 +123,17 @@ export class ShopHandler {
|
||||
let costResult = await handleCost(roleId, sid, cost);
|
||||
if(!costResult) return resResult(STATUS.BATTLE_CONSUMES_NOT_ENOUGH);
|
||||
|
||||
let honour = 0;
|
||||
let reward: RewardInter[] = [];
|
||||
switch (dicGoods.quality) {
|
||||
case HERO_QUALITY_TYPE.BLUE:
|
||||
honour = SHOP.HERO_SOUL_BULE * count; break;
|
||||
reward = parseGoodStr(SHOP.HERO_SOUL_BULE); break;
|
||||
case HERO_QUALITY_TYPE.PURPLE:
|
||||
honour = SHOP.HERO_SOUL_PURPLE * count; break;
|
||||
reward = parseGoodStr(SHOP.HERO_SOUL_PURPLE); break;
|
||||
case HERO_QUALITY_TYPE.GOLD:
|
||||
honour = SHOP.HERO_SOUL_GOLDEN * count; break;
|
||||
reward = parseGoodStr(SHOP.HERO_SOUL_GOLDEN); break;
|
||||
}
|
||||
// 增加功勋
|
||||
let reward = getHonourObject(honour);
|
||||
let goods = await addItems(roleId, roleName, sid, [reward]);
|
||||
// 增加货币
|
||||
let goods = await addItems(roleId, roleName, sid, reward.map(cur => { return {id: cur.id, count: cur.count * count} }));
|
||||
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
goodsId, count,
|
||||
|
||||
@@ -12,7 +12,6 @@ import { participants } from './guildActivityService';
|
||||
import { Member } from '../domain/battleField/guildActivity';
|
||||
import * as dicParam from '../pubUtils/dicParam';
|
||||
import { RewardInter } from '../pubUtils/interface';
|
||||
import { errlogger } from '../util/logger';
|
||||
import { pushCurrentTime } from './chatService';
|
||||
|
||||
// ! 获取底价,假数据
|
||||
@@ -161,8 +160,6 @@ export async function genAuction(guildCode: string, sourceType: number, sourceCo
|
||||
maxPrice, curPrice: basePrice,
|
||||
}
|
||||
});
|
||||
errlogger.error(`******genAuction begin ${begin} end ${end}`);
|
||||
errlogger.error(`******genAuction ${JSON.stringify(lotsData)}`);
|
||||
const lots = await LotModel.createRecs(lotsData);
|
||||
const dividendCode = genCode(DIVIDEND_CODE_LEN);
|
||||
const dividendData: DividendParam = {
|
||||
|
||||
Reference in New Issue
Block a user