fix 合成藏宝图中的bug
This commit is contained in:
@@ -422,7 +422,7 @@ export class ComBattleHandler {
|
||||
const { original } = msg;
|
||||
|
||||
// 原材料检查
|
||||
let originalQuality: number, originalSum: number;
|
||||
let originalQuality: number, originalSum: number = 0;
|
||||
for(let {id, count} of original) {
|
||||
const goodInfo = getGoodById(id);
|
||||
if(!originalQuality) originalQuality = goodInfo.quality;
|
||||
@@ -450,7 +450,7 @@ export class ComBattleHandler {
|
||||
}
|
||||
// 添加寻宝币
|
||||
original.push({
|
||||
id: CURRENCY_BY_TYPE[CURRENCY_TYPE.TREASURE_POINT],
|
||||
id: CURRENCY_BY_TYPE.get(CURRENCY_TYPE.TREASURE_POINT),
|
||||
count: dicCompose.coinNum
|
||||
});
|
||||
// 消耗藏宝图和寻宝币
|
||||
@@ -467,6 +467,6 @@ export class ComBattleHandler {
|
||||
const goods = await handleReward(roleId, roleName, reward);
|
||||
|
||||
|
||||
return resResult(STATUS.SUCCESS, { goods });
|
||||
return resResult(STATUS.SUCCESS, { ...goods, costGold });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user