军团:bug修复

This commit is contained in:
luying
2021-09-26 18:43:53 +08:00
parent 023490c642
commit e952580ac8
9 changed files with 52 additions and 30 deletions
+8 -8
View File
@@ -390,17 +390,9 @@ export async function checkGoods(roleId: string, goodIds: Array<number>) {
} else if (table == ITEM_TABLE.ITEM) {
itemIds.push(goodId);
}
} else {
hids.push(goodId);
}
}
if (!!hids.length) {
let heros = await HeroModel.findByHidRange(hids, roleId);
if (heros.length < hids.length)
return false;
}
//检查装备是否存在
if (!!equipIds.length) {
let resEquips = await EquipModel.getEquipsByIds(roleId, equipIds);
@@ -419,6 +411,14 @@ export async function checkGoods(roleId: string, goodIds: Array<number>) {
return true;
}
export async function checkHeroes(roleId: string, hids: number[]) {
if (!!hids.length) {
let heros = await HeroModel.findByHidRange(hids, roleId);
if (heros.length < hids.length)
return false;
}
return true
}
export async function unlockFigure(sid: string, roleId: string, conditions: { type: number, paramHid?: number, paramFavourLv?: number, paramSkinId?: number }[], role?: RoleType) {
let figureInfo = await pubUnlockFigure(roleId, conditions, role);