任务:修复装备穿戴bug
This commit is contained in:
@@ -569,6 +569,7 @@ export class HeroHandler {
|
||||
if (!dicSkin) return resResult(STATUS.HERO_SKIN_NOT_FIND);
|
||||
let hero = await HeroModel.findByHidAndRoleWithEquip(dicSkin.actorId, roleId);
|
||||
if (!hero) return resResult(STATUS.HERO_NOT_FIND);
|
||||
let oldCount = hero.ePlace.filter(cur => cur.equip).length;
|
||||
|
||||
let newHeroSkins: HeroSkin[] = [];
|
||||
let result = false;
|
||||
@@ -613,7 +614,7 @@ export class HeroHandler {
|
||||
hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP, sid, roleId, hero, {}, oldEquipSeids);
|
||||
await checkTask(roleId, sid, TASK_TYPE.EQUIP_SUM, heroPutNum, true, {});
|
||||
await checkActivityTask(serverId, sid, roleId, TASK_TYPE.EQUIP_SUM, heroPutNum);
|
||||
await checkTaskWithHero(roleId, sid, TASK_TYPE.EQUIP_BY_HERO, hero, [heroPutNum]);
|
||||
await checkTaskWithHero(roleId, sid, TASK_TYPE.EQUIP_BY_HERO, hero, [heroPutNum, oldCount]);
|
||||
}
|
||||
|
||||
hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.SKIN, sid, roleId, hero, { skins: newHeroSkins, skinId: dicSkin.heroId, job: dicNewJob.jobid, ePlace: newEplace });
|
||||
|
||||
Reference in New Issue
Block a user