装备:修改物品表格式
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user