修改数据库,姑且跑起来

This commit is contained in:
luying
2022-02-14 19:47:10 +08:00
parent a43c61cb5a
commit ecc55b3063
11 changed files with 1242 additions and 1166 deletions

View File

@@ -329,37 +329,4 @@ export async function refDailyTaskBox(roleId: string, sid: string, debug = false
point, weeklyPoint, box
}), uids);
}
}
//任务条件
//英雄满装备且都镶嵌相同阶数的宝石
export async function checkTaskConditionEquipSuitJewelStage(hero: HeroType) {
let isTask = true;//是否满足任务条件
let jewelLevel = -1;//宝石阶数
for (let i = 0; i < hero.ePlace.length; i++) {
let equipObj = <EquipType>hero.ePlace[i].equip;
if (equipObj) {
let equipObjInfo = getGoodById(equipObj.id);
if (equipObj.holes.length == equipObjInfo.hole && equipObjInfo.hole > 0) {
for (let j = 0; j < equipObj.holes.length; j++) {
let jewel = equipObj.holes[j].jewel;
let jewelInfo = getGoodById(jewel);
if (jewelInfo) {
if (jewelLevel == -1) {
jewelLevel = jewelInfo.lvLimited;
} else if (jewelInfo.lvLimited != jewelLevel) {
//宝石阶数不同
isTask = false;
break;
}
}
}
} else {
//宝石没有镶满
isTask = false;
break;
}
}
}
return { isTask, jewelLevel };
}