活动:创建英雄的统计添加推送逻辑
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import { Application, BackendSession } from 'pinus';
|
||||
import { resResult } from '../../../pubUtils/util';
|
||||
import { STATUS } from '../../../consts';
|
||||
import { getPlayerGrowthFundData, growthFundActivity } from '../../../services/growthFundService';
|
||||
import { getPlayerGrowthFundData } from '../../../services/growthFundService';
|
||||
import { GrowthFundItem } from '../../../domain/activityField/growthFundField';
|
||||
import { addItems, createHeroes } from '../../../services/rewardService';
|
||||
import { ActivityGrowthFundModel } from '../../../db/ActivityGrowthFund';
|
||||
import { addReward, stringToRewardParam } from '../../../services/giftPackageService';
|
||||
import { RewardParam } from '../../../domain/activityField/rewardField';
|
||||
|
||||
@@ -14,7 +14,7 @@ import { uniq, indexOf, findIndex } from 'underscore';
|
||||
import { HeroModel, HeroType } from '../db/Hero';
|
||||
import { Figure } from '../domain/dbGeneral';
|
||||
import { Rank } from './rankService';
|
||||
import { checkActivityTask, pushTaskUpdate } from './taskService';
|
||||
import { checkActivityTask, pushActivityUpdate, pushTaskUpdate } from './taskService';
|
||||
import { CreateHeroParam } from '../domain/roleField/hero';
|
||||
|
||||
export async function handleCost(roleId: string, sid: string, goods: Array<ItemInter>) {
|
||||
@@ -333,7 +333,7 @@ export async function createHeroes(roleId: string, roleName: string, sid: string
|
||||
let resultHeroes: HeroType[] = [], resultItems: ItemInter[] = [];
|
||||
if (newHeroInfo.length > 0) {
|
||||
|
||||
let { heroes, role, figureInfo, calHeroResults, calAllHeroResults, taskPushMessage } = await pubCreateHeroes(roleId, roleName, serverId, newHeroInfo, funcs);
|
||||
let { heroes, role, figureInfo, calHeroResults, calAllHeroResults, taskPushMessage, activityTaskPushMessage } = await pubCreateHeroes(roleId, roleName, serverId, newHeroInfo, funcs);
|
||||
|
||||
let r = new Rank(REDIS_KEY.HERO_NUM_RANK, { serverId });
|
||||
await r.setRankWithRoleInfo(roleId, role.heroNum, role.heroNumUpdatedAt, role);
|
||||
@@ -348,6 +348,7 @@ export async function createHeroes(roleId: string, roleName: string, sid: string
|
||||
}
|
||||
|
||||
pushTaskUpdate(roleId, sid, null, taskPushMessage);
|
||||
pushActivityUpdate(roleId, sid, null, activityTaskPushMessage);
|
||||
resultHeroes = heroes;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user