任务:添加军团元宝捐献
This commit is contained in:
@@ -5,7 +5,7 @@ import { STATUS, TASK_TYPE, TASK_FUN_TYPE, SHOP_REFRESH_TYPE, WAR_TYPE, PUSH_ROU
|
||||
import { TaskParamInter, TaskListReturn } from '../../domain/roleField/task';
|
||||
import { EPlace, HeroType } from '../../db/Hero';
|
||||
import { HeroScores } from '../../db/PvpHistoryOpp';
|
||||
import { ItemInter } from '../../pubUtils/interface';
|
||||
import { ItemInter, RewardInter } from '../../pubUtils/interface';
|
||||
import { UserTaskModel, UserTaskType } from '../../db/UserTask';
|
||||
import { UserTaskRecModel } from '../../db/UserTaskRec';
|
||||
import { UserTaskHistoryModel } from '../../db/UserTaskHistory';
|
||||
@@ -18,6 +18,7 @@ import { getEquipById } from '../equipService';
|
||||
import { JewelType } from '../../db/Jewel';
|
||||
import { checkPopUpCondition, checkPopUpConditionInCreateHero, checkPopUpConditionInEntry } from '../activity/popUpShopService';
|
||||
import { sendMessageToUserWithSuc } from '../pushService';
|
||||
import { getGoldId } from '../role/rewardService';
|
||||
|
||||
export async function checkTaskWithRoles(serverId: number, roleId: string, sid: string, taskType: TASK_TYPE, roles: RoleType[]) {
|
||||
for (let role of roles) {
|
||||
@@ -297,6 +298,14 @@ export async function checkTaskInComposeStone(serverId: number, roleId: string,
|
||||
await checkTask(serverId, roleId, sid, TASK_TYPE.STONE_COMPOSE, { count });
|
||||
}
|
||||
|
||||
export async function checkTaskInDonate(serverId: number, roleId: string, sid: string, cosume: RewardInter) {
|
||||
let task = new CheckTask(serverId, roleId);
|
||||
task.setParam(TASK_TYPE.GUILD_DONATE, {});
|
||||
if(cosume.id == getGoldId()) {
|
||||
task.setParam(TASK_TYPE.GUILD_GOLD_DONATE, {});
|
||||
}
|
||||
await task.saveAndPush(sid);
|
||||
}
|
||||
|
||||
// 获取task状态
|
||||
export async function getCurTask(roleId: string, session: FrontendOrBackendSession) {
|
||||
|
||||
Reference in New Issue
Block a user