奇遇推送优化,不需要每次传app直接使用pinus.app
This commit is contained in:
@@ -189,8 +189,6 @@ export class NormalBattleHandler {
|
||||
return resResult(STATUS.BATTLE_ACTION_POINT_LACK);
|
||||
}
|
||||
|
||||
let channelService = this.app.get('channelService');
|
||||
|
||||
let warReward = new WarReward(roleId, roleName, sid, battleId, isSuccess);
|
||||
|
||||
let dailyNum = {};
|
||||
@@ -205,9 +203,9 @@ export class NormalBattleHandler {
|
||||
dailyNum = Object.assign(dailyNum, checkResult.data)
|
||||
} else if (warInfo.warType == WAR_TYPE.EVENT) {
|
||||
// 记录事件状态
|
||||
await setBattleStatus(this.app, session, roleId, battleId, isSuccess, battleCode);
|
||||
await setBattleStatus(session, roleId, battleId, isSuccess, battleCode);
|
||||
} else if (warInfo.warType == WAR_TYPE.TOWER) {
|
||||
let towerEndResult = await towerBattleEnd(channelService, sid, roleId, serverId, battleCode, battleId, isSuccess, heroes);
|
||||
let towerEndResult = await towerBattleEnd(sid, roleId, serverId, battleCode, battleId, isSuccess, heroes);
|
||||
if(towerEndResult) {
|
||||
if(towerEndResult.status == -1) {
|
||||
return towerEndResult.resResult;
|
||||
@@ -230,7 +228,7 @@ export class NormalBattleHandler {
|
||||
let {warStar} = await RoleModel.findByRoleId(roleId);
|
||||
let condition1 = warStar.find(cur => cur.id == battleId);
|
||||
if(!condition1) {
|
||||
await switchOnFunc(roleId, FUNC_OPT_TYPE.BATTLE_END, battleId, this.app, session);
|
||||
await switchOnFunc(roleId, FUNC_OPT_TYPE.BATTLE_END, battleId, session);
|
||||
warReward.setCondition(0, true);
|
||||
}
|
||||
// 是否首次3星
|
||||
@@ -248,7 +246,7 @@ export class NormalBattleHandler {
|
||||
}, true);
|
||||
let { status } = updateResult;
|
||||
|
||||
let actordata = await roleLevelup(roleId, isSuccess?warInfo.kingExp:0, this.app, session);// 主公升级经验
|
||||
let actordata = await roleLevelup(roleId, isSuccess?warInfo.kingExp:0, session);// 主公升级经验
|
||||
|
||||
// 返回值:
|
||||
// towerStatus: false-本层未通过, true-本层已通过
|
||||
@@ -309,7 +307,7 @@ export class NormalBattleHandler {
|
||||
let warReward = new WarReward(roleId, roleName, sid, battleId, true);
|
||||
let result = await warReward.saveReward(count);
|
||||
|
||||
let actordata = await roleLevelup(roleId, warInfo.kingExp * count, this.app, session)// 主公升级经验
|
||||
let actordata = await roleLevelup(roleId, warInfo.kingExp * count, session)// 主公升级经验
|
||||
|
||||
// 扫荡记录
|
||||
await BattleSweepRecordModel.saveBattleSweepRecordById(roleId, battleId, {
|
||||
|
||||
Reference in New Issue
Block a user