feat(宝物): 添加宝物系统

This commit is contained in:
luying
2022-12-07 10:55:30 +08:00
parent b684307818
commit a83deeff5f
46 changed files with 15656 additions and 54 deletions

View File

@@ -28,6 +28,7 @@ import { saveRebirthLog } from '../../../pubUtils/logUtil';
import { isGoodsHidden, isHeroHidden } from '../../../services/dataService';
import { LadderMatchModel } from '../../../db/LadderMatch';
import { PvpSaveDataModel } from '../../../db/PvpSaveData';
import { ArtifactModel } from '../../../db/Artifact';
export default function (app: Application) {
new HandlerService(app, {});
@@ -565,7 +566,8 @@ export class HeroHandler {
job: dicNewJob.jobid,
ePlace: newEplace
}
let { curHero } = await calculateCeWithHero(HERO_SYSTEM_TYPE.SKIN, roleId, serverId, sid, hero.hid, update, { hero });
let artifact = hero.artifact? await ArtifactModel.findbySeqId(roleId, hero.artifact): null;
let { curHero } = await calculateCeWithHero(HERO_SYSTEM_TYPE.SKIN, roleId, serverId, sid, hero.hid, update, { hero, artifact });
let resultHero = new HeroParam(curHero);
return resResult(STATUS.SUCCESS, { curHero: {...pick(resultHero, ['hid', 'skins', 'skinId', 'job', 'talent', 'usedTalentPoint']), ePlace: newEplace }});
}