聊天:部分系统推送(宝石和藏宝图合成,秘境遗迹首通,天梯指定关)
This commit is contained in:
@@ -4,9 +4,9 @@ import { difference } from 'underscore';
|
||||
* @Author: 梁桐川
|
||||
* @Date: 2020-11-30 15:05:48
|
||||
* @Last Modified by: 梁桐川
|
||||
* @Last Modified time: 2020-12-03 21:36:00
|
||||
* @Last Modified time: 2021-03-10 20:15:30
|
||||
*/
|
||||
import { IT_TYPE, CURRENCY_BY_TYPE, CURRENCY_TYPE, COM_TEAM_STATUS, COM_BTL_CONST, CONSUME_TYPE, COM_BTL_QUALITY, MSG_SOURCE } from './../../../consts';
|
||||
import { IT_TYPE, CURRENCY_BY_TYPE, CURRENCY_TYPE, COM_TEAM_STATUS, COM_BTL_CONST, CONSUME_TYPE, COM_BTL_QUALITY, MSG_SOURCE, QUALITY_TYPE } from './../../../consts';
|
||||
import { getGoodById, getBlueprtComposeByQuality, getBluePrtByQuality, getWarById, getWarIdByBlueprtId } from '../../../pubUtils/gamedata';
|
||||
import Role, { RoleModel } from '../../../db/Role';
|
||||
import { STATUS } from '../../../consts/statusCode';
|
||||
@@ -21,7 +21,7 @@ import { setAp } from '../../../services/actionPointService';
|
||||
import { roleLevelup } from '../../../services/normalBattleService';
|
||||
import { addUserToChannel } from '../../../services/roleService';
|
||||
import { ChannelUser } from '../../../domain/ChannelUser';
|
||||
import { pushComBtlTeamMsg } from '../../../services/chatService';
|
||||
import { pushComBtlTeamMsg, pushNormalEquipMsg } from '../../../services/chatService';
|
||||
|
||||
export default function(app: Application) {
|
||||
return new ComBattleHandler(app);
|
||||
@@ -674,6 +674,7 @@ export class ComBattleHandler {
|
||||
const roleId = session.get('roleId');
|
||||
const roleName = session.get('roleName');
|
||||
const sid = session.get('sid');
|
||||
const serverId = session.get('serverId');
|
||||
|
||||
const { original } = msg;
|
||||
|
||||
@@ -712,6 +713,10 @@ export class ComBattleHandler {
|
||||
const target = getRandomByLen(targetList);
|
||||
const reward = [{id: target, count: 1}];
|
||||
const goods = await addItems(roleId, roleName, sid, reward);
|
||||
if (dicCompose.targetQuality >= QUALITY_TYPE.ORANGE) {
|
||||
const { name } = getGoodById(target);
|
||||
pushNormalEquipMsg(roleId, roleName, serverId, MSG_SOURCE.ORANGE_BLUEPRT_COMPOSE, target, name);
|
||||
}
|
||||
|
||||
return resResult(STATUS.SUCCESS, { goods, costGold: 0 });
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { BattleRecordModel } from '../../../db/BattleRecord';
|
||||
import { BattleSweepRecordModel } from '../../../db/BattleSweepRecord';
|
||||
import { getWarById, } from '../../../pubUtils/gamedata';
|
||||
import { genCode } from '../../../pubUtils/util';
|
||||
import { WAR_TYPE, EVENT_STATUS, FUNC_OPT_TYPE } from '../../../consts';
|
||||
import { WAR_TYPE, EVENT_STATUS, FUNC_OPT_TYPE, MSG_SOURCE } from '../../../consts';
|
||||
import { checkDaily, checkDailyAndIncrease } from '../../../services/dailyBattleService';
|
||||
import { checkTowerWar, towerBattleEnd } from '../../../services/battleService';
|
||||
import { WarReward } from '../../../services/warRewardService';
|
||||
@@ -11,13 +11,13 @@ import { getAp, setAp } from '../../../services/actionPointService';
|
||||
import { setBattleStatus, checkEventBattle } from '../../../services/eventSercive';
|
||||
import { STATUS } from '../../../consts/statusCode';
|
||||
import { resResult } from '../../../pubUtils/util';
|
||||
import { HeroModel } from '../../../db/Hero';
|
||||
import { RoleModel } from '../../../db/Role';
|
||||
import { RScriptRecordModel } from '../../../db/RScriptRecord';
|
||||
import { updateWarStar, checkBattleHeroes, roleLevelup } from '../../../services/normalBattleService';
|
||||
import { checkDungeonNum, checkDungeonAndIncrease } from '../../../services/dungeonService';
|
||||
import { switchOnFunc } from '../../../services/funcSwitchService';
|
||||
import { gameData } from '../../../pubUtils/data';
|
||||
import { pushMysteryFirstMsg, pushTowerMsg, pushVestigeFirstMsg, shouldPushTowerMsg } from '../../../services/chatService';
|
||||
|
||||
export default function(app: Application) {
|
||||
return new NormalBattleHandler(app);
|
||||
@@ -211,6 +211,7 @@ export class NormalBattleHandler {
|
||||
towerStatus = towerEndResult.data.towerStatus;
|
||||
if(towerEndResult.data.towerReward)
|
||||
warReward.setFixReward(towerEndResult.data.towerReward)
|
||||
pushTowerMsg(roleId, roleName, serverId, MSG_SOURCE.TOWER_SUC, towerEndResult.data.newRec.lv);
|
||||
}
|
||||
} else if (warInfo.warType == WAR_TYPE.MYSTERY || warInfo.warType == WAR_TYPE.MYSTERY_ELITE) {
|
||||
let checkResult = await checkDungeonAndIncrease(roleId, 1, false);
|
||||
@@ -228,6 +229,8 @@ export class NormalBattleHandler {
|
||||
if(!condition1) {
|
||||
await switchOnFunc(roleId, FUNC_OPT_TYPE.BATTLE_END, battleId, session);
|
||||
warReward.setCondition(0, true);
|
||||
pushMysteryFirstMsg(roleId, roleName, serverId, warInfo.warType, warInfo.war_id);
|
||||
pushVestigeFirstMsg(roleId, roleName, serverId, warInfo.warType, warInfo.war_id);
|
||||
}
|
||||
// 是否首次3星
|
||||
if(star == 3 && (!condition1 || condition1.star != 3)) {
|
||||
|
||||
Reference in New Issue
Block a user