任务:修复装备穿戴bug
This commit is contained in:
@@ -137,13 +137,14 @@ export async function handleCost(roleId: string, sid: string, goods: Array<ItemI
|
||||
}
|
||||
}
|
||||
for(let [_hid, {hero, equips} ] of heroMap) {
|
||||
let oldCount = hero.ePlace.filter(cur => cur.equip).length;
|
||||
let args = calEquipSeids(hero);
|
||||
for(let equip of equips) {
|
||||
hero = await HeroModel.removeEquip(roleId, hero.hid, equip.ePlaceId, equip._id);
|
||||
}
|
||||
|
||||
await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP, sid, roleId, hero, {}, args);
|
||||
await checkTaskWithHero(roleId, sid, TASK_TYPE.EQUIP_BY_HERO, hero, [-1]);
|
||||
await checkTaskWithHero(roleId, sid, TASK_TYPE.EQUIP_BY_HERO, hero, [-1, oldCount]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user