装备:修复替换装备bug
This commit is contained in:
@@ -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);//卸下装备并重算战力
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user