装备:修改物品表格式

This commit is contained in:
luying
2021-08-02 15:55:08 +08:00
parent afd45fcf7b
commit e59402e8a7
2 changed files with 6 additions and 4 deletions

View File

@@ -140,8 +140,8 @@ export function checkEquipCanPut(hid: number, id: number) {
let dicGood = gameData.goods.get(id);
let dicHero = gameData.hero.get(hid);
let dicJob = gameData.job.get(dicHero.jobid);
if(dicGood.jobLimited != 0 && dicGood.jobLimited != dicJob.job_class) return false;
if(dicGood.charLimited != 0 && dicGood.charLimited != hid) return false;
if(dicGood.jobLimited.indexOf(0) == -1 && dicGood.jobLimited.indexOf(dicJob.job_class) == -1) return false;
if(dicGood.charLimited.indexOf(0) == -1 && dicGood.charLimited.indexOf(hid) != -1) return false;
return true
}

View File

@@ -20,9 +20,9 @@ export interface DicGoods {
// 星级
readonly equipLvl: number;
// 职业限制
readonly jobLimited: number;
readonly jobLimited: number[];
// 武将限制
readonly charLimited: number;
readonly charLimited: number[];
// 合成装备需要的碎片数
readonly pieces: number;
// 对应的碎片id
@@ -137,6 +137,8 @@ export function loadGoods() {
figureCondition.set(type, mapArr);
}
o.condition = condition;
o.jobLimited = parseNumberList(o.jobLimited);
o.charLimited = parseNumberList(o.charLimited);
dicGoods.set(o.good_id, _.pick(o, Object.keys(DicGoodsKeys)));
if (o.itid == IT_TYPE.BLUEPRT) {