碎片合成bug
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export const IT_TYPE = {
|
||||
BLUEPRT: 28,
|
||||
JEWEL: 40
|
||||
JEWEL: 42
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { dicHero } from "./dictionary/DicHero";
|
||||
import { dicGoods, blueprt, jewels } from "./dictionary/DicGoods";
|
||||
import { dicGoods, blueprt, dicJewel } from "./dictionary/DicGoods";
|
||||
import { dicBlueprtCompose } from "./dictionary/DicBlueprtCompose";
|
||||
import { dicBlueprtPossibility } from "./dictionary/DicBlueprtPossibility";
|
||||
import { dicDaily } from "./dictionary/DicDaily";
|
||||
@@ -67,7 +67,7 @@ export const gameData = {
|
||||
randomEffectPool: dicRandomEffectPool,
|
||||
strengthenCost: dicStrengthenCost,
|
||||
refine: dicRefine,
|
||||
jewels: jewels,
|
||||
jewels: dicJewel,
|
||||
dicHeroEquip: dicHeroEquip
|
||||
};
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// 物品表
|
||||
import {decodeArrayListStr, readJsonFile, parseReward, parseNumberList, decodeArrayStr} from '../util'
|
||||
import {decodeArrayListStr, readJsonFile, parseReward, parseNumberList, decodeArrayStr, deepCopy} from '../util'
|
||||
import { FILENAME, IT_TYPE, ABI_TYPE } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
const _ = require('lodash');
|
||||
const underscore = require('underscore');
|
||||
|
||||
export interface SpecialMaterial {
|
||||
readonly ids: number[];
|
||||
@@ -83,10 +84,9 @@ const DicGoodsKeys: KeysEnum<DicGoods> = {
|
||||
count: true,
|
||||
nextJewelId: true,
|
||||
}
|
||||
|
||||
export const dicJewel = new Map<number, DicGoods>();
|
||||
export const dicGoods = new Map<number, DicGoods>();
|
||||
export const blueprt = new Map<number, Array<number>>();
|
||||
export const jewels = new Map<number, DicGoods>();
|
||||
let jewelsMap = {};
|
||||
arr.forEach(o => {
|
||||
o.goodsAbility = parseAbility(o);
|
||||
@@ -103,20 +103,18 @@ arr.forEach(o => {
|
||||
arr.push(o.good_id);
|
||||
blueprt.set(o.quality, arr);
|
||||
} else if (o.itid == IT_TYPE.JEWEL) {
|
||||
jewelsMap[o.good_id] = o;
|
||||
let material = o.composeMaterial[0];
|
||||
if (!!material && !!material.id) {
|
||||
let lastJewel = underscore.findWhere(arr,{good_id:material.id});
|
||||
if (!!lastJewel) {
|
||||
lastJewel.count = material.count;
|
||||
lastJewel.nextJewelId = o.good_id;
|
||||
dicJewel.set(lastJewel.good_id, _.pick(lastJewel, Object.keys(DicGoodsKeys)));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
for (let key in jewelsMap) {
|
||||
let jewel = jewelsMap[key];
|
||||
let material = jewel.composeMaterial[0];
|
||||
if (!!material && !!material.id) {
|
||||
let nextJewel = jewelsMap[material.id];
|
||||
nextJewel.count = material.count;
|
||||
nextJewel.nextJewelId = material.id;
|
||||
jewels.set(jewel.good_id, _.pick(nextJewel, Object.keys(DicGoodsKeys)));
|
||||
}
|
||||
}
|
||||
jewelsMap = undefined;
|
||||
arr = undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user