装备:修复替换装备bug

This commit is contained in:
luying
2021-04-26 17:01:11 +08:00
parent 14efd9aed2
commit 4d5db3b851
2 changed files with 1 additions and 5 deletions

View File

@@ -75,11 +75,6 @@ export async function changeEquip(roleId: string, sid: string, equipA: EquipType
}
let res = await dressEquip(roleId, sid, heroB, equipA, funcs);//替换给武将,并计算战力
return res;
} else {
if(equipB) {
let res = await takeOffEquipAndCalPlayerCe(roleId, sid, heroB, equipB, id, funcs);//卸下装备并重算战力
return res;
}
}
} else if (!!heroB) {//从穿戴装备的武将上卸下装备
await takeOffEquipAndCalPlayerCe(roleId, sid, heroB, equipB, id, funcs);//卸下装备并重算战力

View File

@@ -74,6 +74,7 @@ export async function handleCost(roleId: string, sid: string, goods: Array<ItemI
function sortConsumes(goods: Array<ItemInter>, bags: Array<ItemInter>, currencysMap: any, equips: Array<number>) {
for (let good of goods) {
if(good.count == 0) continue;
let goodInfo = getGoodById(good.id);
let { type, table } = ITID.get(goodInfo.itid);