军团:bug修复
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user