弹出礼包:金将类型逻辑
This commit is contained in:
@@ -19,6 +19,7 @@ import { JewelType } from '../../db/Jewel';
|
||||
import { checkPopUpCondition, checkPopUpConditionInCreateHero, checkPopUpConditionInEntry } from '../activity/popUpShopService';
|
||||
import { sendMessageToUserWithSuc } from '../pushService';
|
||||
import { getGoldId } from '../role/rewardService';
|
||||
import { GachaResult } from '../../domain/activityField/gachaField';
|
||||
|
||||
export async function checkTaskWithRoles(serverId: number, roleId: string, sid: string, taskType: TASK_TYPE, roles: RoleType[]) {
|
||||
for (let role of roles) {
|
||||
@@ -57,7 +58,6 @@ export async function checkTaskInCreateHero(serverId: number, roleId: string, si
|
||||
task.setParam(TASK_TYPE.HERO_QUALITY_STAR_UP, { heroes });
|
||||
task.setParam(TASK_TYPE.HERO_LV, { heroes });
|
||||
await task.saveAndPush(sid);
|
||||
await checkPopUpConditionInCreateHero(serverId, roleId, heroes);
|
||||
}
|
||||
|
||||
export async function checkTaskInHeroStarUp(serverId: number, roleId: string, sid: string, hero: HeroType, oldStar: number) {
|
||||
@@ -219,11 +219,12 @@ export async function checkTaskInPvpEnd(serverId: number, roleId: string, sid: s
|
||||
}
|
||||
}
|
||||
|
||||
export async function checkTaskInGacha(serverId: number, roleId: string, sid: string, count: number, heroes: HeroType[]) {
|
||||
export async function checkTaskInGacha(serverId: number, roleId: string, sid: string, count: number, heroes: HeroType[], result: GachaResult[], isGuide: boolean) {
|
||||
let task = new CheckTask(serverId, roleId);
|
||||
task.setParam(TASK_TYPE.GACHA, { count });
|
||||
task.setParam(TASK_TYPE.GACHA_QUALITY_COUNT, { heroes });
|
||||
await task.saveAndPush(sid);
|
||||
if(!isGuide) checkPopUpConditionInCreateHero(serverId, roleId, result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user