From 29c5ae8a0aee386be16acaa091bfdb9970de6067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=86=E8=8E=B9?= Date: Wed, 23 Mar 2022 10:25:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A9=E8=B5=8B=EF=BC=9A=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/servers/role/handler/heroHandler.ts | 9 +++++---- game-server/app/services/connectorService.ts | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/game-server/app/servers/role/handler/heroHandler.ts b/game-server/app/servers/role/handler/heroHandler.ts index 3860e8649..2b8035e82 100644 --- a/game-server/app/servers/role/handler/heroHandler.ts +++ b/game-server/app/servers/role/handler/heroHandler.ts @@ -424,7 +424,8 @@ export class HeroHandler { // 任务 await checkTask(serverId, roleId, sid, TASK_TYPE.HERO_STAGE_UP, { hero, stageUpCnt: 1 }) - return resResult(STATUS.SUCCESS, { curHero: { hid: hero.hid, job: hero.job, jobStage: hero.jobStage } }); + const heroResult = new HeroParam(hero); + return resResult(STATUS.SUCCESS, { curHero: {...pick(heroResult, ['hid', 'job', 'jobStage', 'totalTalentPoint']) }}); } //激活羁绊 @@ -724,7 +725,7 @@ export class HeroHandler { hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.TALENT, sid, roleId, hero, { skins: newSkins }); const heroResult = new HeroParam(hero); - return resResult(STATUS.SUCCESS, { curHero: {...pick(heroResult, ['hid', 'talent', 'usedTalentPoint']) }}); + return resResult(STATUS.SUCCESS, { curHero: {...pick(heroResult, ['hid', 'talent', 'usedTalentPoint', 'totalTalentPoint']) }}); } @@ -761,7 +762,7 @@ export class HeroHandler { hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.TALENT, sid, roleId, hero, { skins: newSkins }); const heroResult = new HeroParam(hero); - return resResult(STATUS.SUCCESS, { curHero: {...pick(heroResult, ['hid', 'talent', 'usedTalentPoint']) }}); + return resResult(STATUS.SUCCESS, { curHero: {...pick(heroResult, ['hid', 'talent', 'usedTalentPoint', 'totalTalentPoint']) }}); } // 洗点 @@ -786,7 +787,7 @@ export class HeroHandler { hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.TALENT, sid, roleId, hero, { skins: newSkins }); const heroResult = new HeroParam(hero); - return resResult(STATUS.SUCCESS, { curHero: {...pick(heroResult, ['hid', 'talent', 'usedTalentPoint']) }}); + return resResult(STATUS.SUCCESS, { curHero: {...pick(heroResult, ['hid', 'talent', 'usedTalentPoint', 'totalTalentPoint']) }}); } // ! debug接口 一键全武将 diff --git a/game-server/app/services/connectorService.ts b/game-server/app/services/connectorService.ts index d5baf33ce..1dc901d6b 100644 --- a/game-server/app/services/connectorService.ts +++ b/game-server/app/services/connectorService.ts @@ -8,7 +8,7 @@ import { getCurTask, getPvpTask } from './task/taskService'; import { RoleType } from '../db/Role'; import { Application, FrontendOrBackendSession, pinus, RpcClient } from 'pinus'; import { resResult } from '../pubUtils/util'; -import { STATUS, PUSH_BATCH, PUSH_INTERVAL, CONSUME_TYPE, HERO_SELECT } from '../consts'; +import { STATUS, PUSH_BATCH, PUSH_INTERVAL, CONSUME_TYPE, HERO_SELECT, ENTERY_ROLE_PICK } from '../consts'; import { getAllShopList } from './shopService'; import { getGeneralRank, getRankFirstReward } from './rankService'; import { getFriendList, getApplyList } from './friendService'; @@ -42,6 +42,7 @@ import { JewelModel } from '../db/Jewel'; import { SkinModel } from '../db/Skin'; import { getAp } from './actionPointService'; import { HeroParam } from '../domain/roleField/hero'; +import { pick } from 'underscore'; /** * init: 初始的时候是否推送 true-推 false-不推 @@ -123,7 +124,7 @@ async function getModuleData(type: string, data: { role: RoleType, session: Fron role.heads = role.heads.filter(cur => cur.status); role.frames = role.frames.filter(cur => cur.status); role.spines = role.spines.filter(cur => cur.status); - return role; + return pick(role, ENTERY_ROLE_PICK); case 'shop': // 商店 return await getAllShopList(roleId); case 'rank': // 排名