初始:修复提前初始远征数据bug

This commit is contained in:
luying
2021-06-24 15:18:41 +08:00
parent de89b01886
commit bdd7edaeaf
6 changed files with 28 additions and 21 deletions
@@ -33,6 +33,7 @@ export class ExpeditionBattleHandler {
let roleName = session.get('roleName');
let res = await getExpeditionStatus(roleId, roleName);
if(!res) return resResult(STATUS.ROLE_IS_NOT_INIT);
return resResult(STATUS.SUCCESS, res);
}
@@ -90,7 +90,7 @@ export class EntryHandler {
checkTaskWithRole(serverId, role.roleId, self.app.get('serverId'), role.funcs, TASK_TYPE.LOGIN_SUM, role);
checkTaskWithRole(serverId, role.roleId, self.app.get('serverId'), role.funcs, TASK_TYPE.LOGIN_SERIES, role);
// 推送数据
pushData(role, session);
if(role.hasInit) pushData(role, session);
role['heros'] = heros;
role['equips'] = equips;
@@ -20,6 +20,7 @@ import { checkTaskWithHero, checkTask, checkTaskWithArgs, checkActivityTask } fr
import { getGoldObject, getCoinObject } from '../../../pubUtils/itemUtils';
import { RScriptRecordModel } from '../../../db/RScriptRecord';
import { checkPvp } from '../../../services/pvpService';
import { pushData } from '../../../services/connectorService';
export default function (app: Application) {
return new RoleHandler(app);
@@ -63,6 +64,7 @@ export class RoleHandler {
await RScriptRecordModel.setScript(roleId, battleId, warInfo.warType, 2, SCRIPT.SCRIPT_NAME);
await checkPvp(role);
return resResult(STATUS.SUCCESS, {
roleId, roleName, heroes
})