装备:任务

This commit is contained in:
luying
2022-02-22 10:56:31 +08:00
parent 56f2c23929
commit 3f5371df79
11 changed files with 598 additions and 262 deletions

View File

@@ -1,5 +1,5 @@
import { Application, BackendSession, HandlerService, } from "pinus";
import { STATUS, HERO_SYSTEM_TYPE, ITEM_CHANGE_REASON } from "../../../consts";
import { STATUS, HERO_SYSTEM_TYPE, ITEM_CHANGE_REASON, TASK_TYPE } from "../../../consts";
import { ItemInter, RewardInter } from "../../../pubUtils/interface";
import { resResult, parseGoodStr } from "../../../pubUtils/util";
@@ -13,6 +13,7 @@ import { getRandSeResult, updateEplace, updateEplaces, checkJewelCanPutOnEquip,
import { isNumber, pick } from 'underscore';
import { JewelModel } from "../../../db/Jewel";
import { getJewelRandSe } from "../../../pubUtils/itemUtils";
import { checkTask, checkTaskInPutJewel, checkTaskWithEplaces, checkTaskWithHero } from "../../../services/taskService";
export default function (app: Application) {
new HandlerService(app, {});
@@ -32,8 +33,9 @@ export class EquipHandler {
let hero = await HeroModel.findByHidAndRole(hid, roleId);
if(!hero) return resResult(STATUS.HERO_NOT_FIND);
let curEquip = hero.ePlace?.find(equip => equip.id == ePlaceId );
let oldEplace = hero.ePlace||[];
let curEquip = oldEplace.find(equip => equip.id == ePlaceId );
if(curEquip) return resResult(STATUS.EQUIP_HAS_COMPOSE);
let dicHero = gameData.hero.get(hid);
@@ -44,10 +46,13 @@ export class EquipHandler {
if(!consumeResult) return resResult(STATUS.ROLE_MATERIAL_NOT_ENOUGH);
let newEquip = new EPlace(ePlaceId, dicEquip.id);
let newEplace = hero.ePlace? [...hero.ePlace, newEquip]: [newEquip];
let newEplace = [...oldEplace, newEquip];
hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.COMPOSE_EQUIP, sid, roleId, hero, { ePlace: newEplace }, [ePlaceId]);
await checkTask(roleId, sid, TASK_TYPE.EQUIP_COMPOSE, 1, true, {});
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_COMPOSE_CNT, oldEplace, newEplace, [ePlaceId], {});
return resResult(STATUS.SUCCESS, {
curHero: {
hid: hero.hid,
@@ -67,8 +72,8 @@ export class EquipHandler {
let { hid, ePlaceId, isOneClick } = msg;
let hero = await HeroModel.findByHidAndRole(hid, roleId);
if (!hero) return resResult(STATUS.HERO_NOT_FIND);
let curEquip = hero.ePlace?.find(cur => cur.id == ePlaceId);
let oldEplace = hero.ePlace||[];
let curEquip = oldEplace.find(cur => cur.id == ePlaceId);
if(!curEquip) return resResult(STATUS.EQUIP_NOT_FIND);
if(curEquip.lv >= hero.lv) return resResult(STATUS.ROLE_EQUIP_REACH_MAX);
let fromLv = curEquip.lv;
@@ -87,11 +92,12 @@ export class EquipHandler {
let result = await handleCost(roleId, sid, consumes, ITEM_CHANGE_REASON.EQUIP_STRENTHEN);
if (!result) return resResult(STATUS.ROLE_MATERIAL_NOT_ENOUGH);
let { newEplace, updatedEplace } = updateEplace(hero.ePlace, ePlaceId, { lv: newLv });
let { newEplace, updatedEplace } = updateEplace(oldEplace, ePlaceId, { lv: newLv });
hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP_STRENGTH, sid, roleId, hero, { ePlace: newEplace }, [ePlaceId]);
// TODO 任务
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_LV_TO, oldEplace, newEplace, [ePlaceId]);
await checkTask(roleId, sid, TASK_TYPE.EQUIP_LV_UP, 1, true, {});
const curHero = {
hid,
@@ -135,11 +141,12 @@ export class EquipHandler {
let result = await handleCost(roleId, sid, consumes, ITEM_CHANGE_REASON.EQUIP_STRENTHEN);
if (!result) return resResult(STATUS.ROLE_MATERIAL_NOT_ENOUGH);
let { newEplace, updatedEplace } = updateEplaces(hero.ePlace, eplaceIds);
let { newEplace, updatedEplace } = updateEplaces(ePlace, eplaceIds);
await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP_STRENGTH, sid, roleId, hero, { ePlace: newEplace }, [...eplaceIds.keys()]);
// TODO 任务
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_LV_TO, ePlace, newEplace, [...eplaceIds.keys()]);
await checkTask(roleId, sid, TASK_TYPE.EQUIP_LV_UP, eplaceIds.size, true, {});
const curHero = {
hid,
@@ -161,7 +168,8 @@ export class EquipHandler {
let hero = await HeroModel.findByHidAndRole(hid, roleId);
if (!hero) return resResult(STATUS.HERO_NOT_FIND);
let curEquip = hero.ePlace?.find(cur => cur.id == ePlaceId);
let oldEplace = hero.ePlace||[];
let curEquip = oldEplace.find(cur => cur.id == ePlaceId);
if(!curEquip) return resResult(STATUS.EQUIP_NOT_FIND);
let nextEquipQuality = getNextEquipQuality(curEquip.equipId, curEquip.quality, curEquip.qualityStage);
@@ -198,10 +206,13 @@ export class EquipHandler {
let isUpQuality = update.quality != curEquip.quality;
let { newEplace, updatedEplace } = updateEplace(hero.ePlace, ePlaceId, update);
let { newEplace, updatedEplace } = updateEplace(oldEplace, ePlaceId, update);
hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP_QUALITY, sid, roleId, hero, { ePlace: newEplace }, [ePlaceId]);
// TODO 任务
if(isUpQuality) {
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_QUALITY_UP, oldEplace, newEplace, [ePlaceId], { hid });
await checkTask(roleId, sid, TASK_TYPE.EQUIP_QUALITY_UP_CNT, 1, true, {});
}
const curHero = {
hid,
isUpQuality,
@@ -222,7 +233,8 @@ export class EquipHandler {
let hero = await HeroModel.findByHidAndRole(hid, roleId);
if (!hero) return resResult(STATUS.HERO_NOT_FIND);
let curEquip = hero.ePlace?.find(cur => cur.id == ePlaceId);
let oldEplace = hero.ePlace||[];
let curEquip = oldEplace.find(cur => cur.id == ePlaceId);
if(!curEquip) return resResult(STATUS.EQUIP_NOT_FIND);
let update = {
@@ -267,10 +279,14 @@ export class EquipHandler {
let result = await handleCost(roleId, sid, consumes, ITEM_CHANGE_REASON.EQUIP_STARUP);
if (!result) return resResult(STATUS.ROLE_MATERIAL_NOT_ENOUGH);
let { newEplace, updatedEplace } = updateEplace(hero.ePlace, ePlaceId, update);
let { newEplace, updatedEplace } = updateEplace(oldEplace, ePlaceId, update);
hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP_STAR, sid, roleId, hero, { ePlace: newEplace }, [ePlaceId]);
// TODO 任务
if(isUpStar) {
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_STAR_UP_TO, oldEplace, newEplace, [ePlaceId]);
await checkTask(roleId, sid, TASK_TYPE.EQUIP_STAR_UP_CNT, 1, true, {});
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_SUIT_SEID_NUM, oldEplace, newEplace, [ePlaceId], { hid });
}
const curHero = {
hid,
@@ -290,7 +306,8 @@ export class EquipHandler {
let hero = await HeroModel.findByHidAndRole(hid, roleId);
if (!hero) return resResult(STATUS.HERO_NOT_FIND);
let curEquip = hero.ePlace?.find(cur => cur.id == ePlaceId);
let oldEplace = hero.ePlace||[];
let curEquip = oldEplace.find(cur => cur.id == ePlaceId);
if(!curEquip) return resResult(STATUS.EQUIP_NOT_FIND);
let jewel = await JewelModel.findbySeqId(seqId);
if(!jewel) return resResult(STATUS.JEWEL_IS_NOT_FIND);
@@ -304,12 +321,15 @@ export class EquipHandler {
let canSentMineToOrigin = false; // 自己的能不能塞到对方身上
if(jewel.hid != 0) { // 如果天晶石原本镶嵌在其他武将身上,把自己的给他
let originHero = await HeroModel.findByHidAndRole(jewel.hid, roleId);
let originEquip = originHero?.ePlace?.find(cur => cur.jewel == seqId);
let originEplace = originHero?.ePlace||[];
let originEquip = originEplace.find(cur => cur.jewel == seqId);
if(originEquip) {
let canChange = originJewel && checkJewelCanPutOnEquip(originEquip, originJewel);
if(canChange) canSentMineToOrigin = true;
let { newEplace, updatedEplace } = updateEplace(originHero.ePlace, ePlaceId, { jewel: canChange? originJewel.seqId: 0 });
let { newEplace, updatedEplace } = updateEplace(originEplace, ePlaceId, { jewel: canChange? originJewel.seqId: 0 });
await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP_JEWEL, sid, roleId, originHero, { ePlace: newEplace }, [ePlaceId], { oldJewel: jewel, newJewel: canChange? originJewel:null });
await checkTaskInPutJewel(roleId, sid, originEplace, newEplace, ePlaceId, jewel, canChange? originJewel:null);
originHeroResult = { hid: originHero.hid, ePlace: updatedEplace };
}
}
@@ -319,8 +339,10 @@ export class EquipHandler {
// 目标镶嵌上
let curJewel = await JewelModel.putOnOrOff(seqId, hid, ePlaceId);
let { newEplace, updatedEplace } = updateEplace(hero.ePlace, ePlaceId, { jewel: seqId });
let { newEplace, updatedEplace } = updateEplace(oldEplace, ePlaceId, { jewel: seqId });
await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP_JEWEL, sid, roleId, hero, { ePlace: newEplace }, [ePlaceId], { oldJewel: originJewel, newJewel: curJewel });
await checkTaskInPutJewel(roleId, sid, oldEplace, newEplace, ePlaceId, originJewel, curJewel);
let curHero = {
hid,
eplace: updatedEplace
@@ -338,13 +360,16 @@ export class EquipHandler {
let hero = await HeroModel.findByHidAndRole(hid, roleId);
if (!hero) return resResult(STATUS.HERO_NOT_FIND);
let curEquip = hero.ePlace?.find(cur => cur.id == ePlaceId);
let oldEplace = hero.ePlace||[];
let curEquip = oldEplace.find(cur => cur.id == ePlaceId);
if(!curEquip) return resResult(STATUS.EQUIP_NOT_FIND);
if(curEquip.jewel == 0) return resResult(STATUS.JEWEL_NOT_SUIT);
let curJewel = await JewelModel.putOnOrOff(curEquip.jewel, 0, 0);
let { newEplace, updatedEplace } = updateEplace(hero.ePlace, ePlaceId, { jewel: 0 });
let { newEplace, updatedEplace } = updateEplace(oldEplace, ePlaceId, { jewel: 0 });
await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP_JEWEL, sid, roleId, hero, { ePlace: newEplace }, [ePlaceId], { oldJewel: curJewel });
await checkTaskInPutJewel(roleId, sid, oldEplace, newEplace, ePlaceId, null, curJewel);
let curHero = {
hid,
eplace: updatedEplace
@@ -363,7 +388,8 @@ export class EquipHandler {
let hero = await HeroModel.findByHidAndRole(hid, roleId);
if (!hero) return resResult(STATUS.HERO_NOT_FIND);
let curEquip = hero.ePlace?.find(cur => cur.id == ePlaceId);
let oldEplace = hero.ePlace||[];
let curEquip = oldEplace.find(cur => cur.id == ePlaceId);
if(!curEquip) return resResult(STATUS.EQUIP_NOT_FIND);
let curStone = curEquip.stones?.find(cur => cur.id == stonesId)||{ id: stonesId, stone: 0 };
@@ -382,9 +408,14 @@ export class EquipHandler {
}
let newStone = updateStone(curEquip.stones, stonesId, gid);
let { newEplace, updatedEplace } = updateEplace(hero.ePlace, ePlaceId, { stones: newStone });
let { newEplace, updatedEplace } = updateEplace(oldEplace, ePlaceId, { stones: newStone });
let jewel = await JewelModel.findbySeqId(curEquip.jewel);
await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP_STONE, sid, roleId, hero, { ePlace: newEplace }, [ePlaceId], { jewel });
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_PUT_STONE, oldEplace, newEplace, [ePlaceId]);
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_STONE_CNT, oldEplace, newEplace, [ePlaceId]);
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_STONE_CNT_LV, oldEplace, newEplace, [ePlaceId]);
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_JEWEL_RANDSE_CNT, oldEplace, newEplace, [ePlaceId], { jewels: [ jewel ] });
let curHero = {
hid,
eplace: updatedEplace
@@ -506,8 +537,7 @@ export class EquipHandler {
await calPlayerCeAndSave(HERO_SYSTEM_TYPE.JEWEL_RESET_RANDSE, sid, roleId, hero, {}, [ePlaceId], { oldJewel: jewel, newJewel });
}
// TODO 任务
// await checkTask(roleId, sid, TASK_TYPE.EQUIP_RESTRENGTHEN, 1, true, {});
await checkTask(roleId, sid, TASK_TYPE.JEWEL_RESET, 1, true, {});
return resResult(STATUS.SUCCESS, { curJewel: pick(newJewel, ['seqId', 'id', 'hid', 'ePlaceId', 'randSe', 'previewRandSe']) });
@@ -590,8 +620,8 @@ export class EquipHandler {
await calPlayerCeAndSave(HERO_SYSTEM_TYPE.JEWEL_QUENCH, sid, roleId, hero, {}, [ePlaceId], { oldJewel: jewel, newJewel });
}
// TODO 任务
// await checkTask(roleId, sid, TASK_TYPE.EQUIP_RESTRENGTHEN, 1, true, {});
await checkTask(roleId, sid, TASK_TYPE.JEWEL_QUENCH, 1, true, {});
if(isSuccess) await checkTask(roleId, sid, TASK_TYPE.JEWEL_QUENCH_SUCCESS, 1, true, {});
return resResult(STATUS.SUCCESS, { isSuccess, curJewel: pick(newJewel, ['seqId', 'id', 'hid', 'ePlaceId', 'randSe', 'previewRandSe']) });
@@ -668,6 +698,7 @@ export class EquipHandler {
if (!costResult) return resResult(STATUS.ROLE_MATERIAL_NOT_ENOUGH);
let goods = await addItems(roleId, roleName, sid, [{ id, count }], ITEM_CHANGE_REASON.COMPOSE_STONE);
await checkTask(roleId, sid, TASK_TYPE.STONE_COMPOSE, count, true, {});
return resResult(STATUS.SUCCESS, { goods });
}

View File

@@ -4,7 +4,7 @@ import { pinus, FrontendOrBackendSession } from 'pinus';
import { resResult, shouldRefresh } from '../pubUtils/util';
import { STATUS, TASK_TYPE, TASK_FUN_TYPE, SHOP_REFRESH_TYPE, WAR_TYPE } from '../consts';
import { TaskParam, TaskListReturn } from '../domain/roleField/task';
import { HeroType } from '../db/Hero';
import { EPlace, HeroType } from '../db/Hero';
import { getRoleOnlineInfo } from './redisService';
import { HeroScores } from '../db/PvpHistoryOpp';
import { ItemInter } from '../pubUtils/interface';
@@ -15,6 +15,7 @@ import { gameData } from '../pubUtils/data';
import { getSeconds, getZeroPointD } from '../pubUtils/timeUtil';
import { RoleStatus } from '../db/ComBattleTeam';
import { getActivities } from './activity/activityService';
import { JewelType } from '../db/Jewel';
export async function checkTaskWithRoles(serverId: number, roleId: string, sid: string, taskType: number, roles: RoleType[]) {
for (let role of roles) {
@@ -34,6 +35,11 @@ export async function checkTaskWithHero(roleId: string, sid: string, taskType: n
pushTaskUpdate(roleId, sid, pushMessage);
}
export async function checkTaskWithEplaces(roleId: string, sid: string, taskType: number, eplace: EPlace[], newEplace: EPlace[], eplaceIds: number[], params?: any) {
let pushMessage = await taskUtil.checkTaskWithEplaces(roleId, taskType, eplace, newEplace, eplaceIds, params);
pushTaskUpdate(roleId, sid, pushMessage);
}
// export async function checkTaskWithEquip(roleId: string, sid: string, taskType: number, equip: EquipType, args?: number[]) {
// let pushMessage = await taskUtil.checkTaskWithEquip(roleId, taskType, equip, args);
// pushTaskUpdate(roleId, sid, pushMessage);
@@ -294,6 +300,12 @@ export async function getPvpTask(roleId: string) {
return { taskList }
}
export async function checkTaskInPutJewel(roleId: string, sid: string, oldEplace: EPlace[], newEplace: EPlace[], ePlaceId: number, originJewel: JewelType, curJewel: JewelType) {
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_PUT_JEWEL, oldEplace, newEplace, [ePlaceId], { jewels: [originJewel, curJewel ] });
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_PUT_JEWEL_CNT, oldEplace, newEplace, [ePlaceId]);
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_JEWEL_RANDSE_CNT, oldEplace, newEplace, [ePlaceId], { jewels: [originJewel, curJewel ] });
}
// 刷新每日任务
export async function refDailyTask(roleId: string, sid: string) {
let userTask = await UserTaskModel.findByRole(roleId);

View File

@@ -609,18 +609,18 @@ export enum TASK_TYPE {
ROLE_TITLE = 19, // 爵位
ROLE_TERAPH_STRENGTHEN = 20, // 神像强化
ROLE_SCROLL_ACTIVE = 21, // 名将谱激活
EQUIP_SUM = 22, // 总装备数
EQUIP_BY_HERO = 23, // 各武将装备数量
EQUIP_QUALITY = 24, // 装备品质
EQUIP_STRENGTHEN = 25, // 装备栏强化
EQUIP_JEWEL = 26, // 多少装备镶嵌宝石
EQUIP_COMPOSE_SUIT = 27, // 合成套装
EQUIP_SUIT = 28, // 拥有套装
// EQUIP_SUM = 22, // 总装备数
// EQUIP_BY_HERO = 23, // 各武将装备数量
// EQUIP_QUALITY = 24, // 装备品质
// EQUIP_STRENGTHEN = 25, // 装备栏强化
// EQUIP_JEWEL = 26, // 多少装备镶嵌宝石
// EQUIP_COMPOSE_SUIT = 27, // 合成套装
// EQUIP_SUIT = 28, // 拥有套装
ROLE_SIGN = 29, // 签到 暂无
EQUIP_REFINE = 30, // 成功精炼
EQUIP_RESTRENGTHEN = 31, // 洗炼
EQUIP_JEWEL_STAGE = 32, // 镶嵌几阶宝石
EQUIP_JEWEL_SUM = 33, // 总计镶嵌多少宝石
// EQUIP_REFINE = 30, // 成功精炼
// EQUIP_RESTRENGTHEN = 31, // 洗炼
// EQUIP_JEWEL_STAGE = 32, // 镶嵌几阶宝石
// EQUIP_JEWEL_SUM = 33, // 总计镶嵌多少宝石
FRIEND_NUM = 34, // 好友人数
FRIEND_SEND_HEART = 35, // 赠送友情点
CHAT = 36, // 发送消息
@@ -664,16 +664,37 @@ export enum TASK_TYPE {
HERO_QUALITY_TO_QUALITY_COUNT = 74,// *名武将*品升*品
HERO_QUALITY_WAKE_UP_COUNT = 75, // *名武将*品觉醒
HERO_WAKE_UP_STAR_UP_COUNT = 76, // *名武将升至觉醒*星
EQUIP_REFINE_LV = 77, // *件装备成功精炼到*级
EQUIP_SUIT_JEWEL_STAGE = 78, // *次触发,一个武将满装备情况下,必须都镶嵌有相同阶的宝石(阶数大于等于x情况下都算达成)
// EQUIP_REFINE_LV = 77, // *件装备成功精炼到*级
// EQUIP_SUIT_JEWEL_STAGE = 78, // *次触发,一个武将满装备情况下,必须都镶嵌有相同阶的宝石(阶数大于等于x情况下都算达成)
GUILD_TRAIN_COUNT = 79, // 练兵场通关x层
HERO_UNLOCK = 80, // 名将谱x阵营全部激活
GACHA_QUALITY_COUNT = 81, // 抽到*次品质*武将
ROLE_TERAPH_STAGE_UP = 82, // 神像进阶
EQUIP_QUALITY_COUNT = 83, // 获得*件品质的*装备
// EQUIP_QUALITY_COUNT = 83, // 获得*件品质的*装备
HERO_WAKE_UP_COUNT = 84, // *名武将觉醒
GUILD_JOIN_ACTIVITY_END = 85, // 参与*军团活动到结束
ACTIVITY_RMB = 86, // 累计充值*元
EQUIP_LV_TO = 87, // x件装备强化至x级
EQUIP_PUT_JEWEL = 88, // 多少件装备多少阶天晶石
EQUIP_PUT_STONE = 89, // 多少件装备多少个地玉石
EQUIP_STAR_UP_TO = 90, // 装备升到多少星
EQUIP_STAR_UP_CNT = 91, // 装备升星多少次
EQUIP_SUIT_SEID_NUM = 92, // 激活套装属性条数
EQUIP_QUALITY_UP = 93, // 多少件装备升品
EQUIP_QUALITY_UP_CNT = 94, // 装备升品多少次
EQUIP_QUALITY_UP_TO = 95, // 装备升到多少品
EQUIP_COMPOSE = 96, // 合成
EQUIP_COMPOSE_CNT = 97, // 多少名武将有多少装备
EQUIP_LV_UP = 98, // 装备等级
EQUIP_PUT_JEWEL_CNT = 99, // 多少装备镶嵌天晶
EQUIP_PUT_STONE_CNT = 100, // 多少装备镶嵌地玉
EQUIP_STONE_CNT = 101, // 镶嵌了多少地玉
EQUIP_STONE_CNT_LV = 102, // 多少装备镶嵌多少多少阶的地玉
EQUIP_JEWEL_RANDSE_CNT = 103, // 多少天晶的多少条词条激活
STONE_COMPOSE = 104, // 合成地玉石
JEWEL_RESET = 105, // 天晶洗练
JEWEL_QUENCH = 106, // 天晶淬炼
JEWEL_QUENCH_SUCCESS = 107, // 天晶淬炼成功
}
// 任务累积类型

View File

@@ -33,6 +33,9 @@ export default class UserTaskRec extends BaseModel {
@prop({ required: true, type: Number, default: [] })
received: number[]; // 是否已领取
@prop({ required: true, type: String, default: [] })
records: string[]; // 历史记录
private static getRefreshCondition(type: number) {
let today = getZeroPointD();
@@ -55,6 +58,8 @@ export default class UserTaskRec extends BaseModel {
return rec;
}
public static async checkHistoryAndSetTaskRec(roleId: string, type: number, taskType: number, group: string, count: number) {
let rec: UserTaskRecType = await UserTaskRecModel.findByRoleAndGroup(roleId, type, taskType, group);
if(rec) {
@@ -67,6 +72,15 @@ export default class UserTaskRec extends BaseModel {
return rec;
}
public static async checkRecordAndIncTaskRec(roleId: string, type: number, taskType: number, group: string, count: number, record: string) {
let rec: UserTaskRecType = await UserTaskRecModel.findByRoleAndGroup(roleId, type, taskType, group);
if(!rec || rec.records.indexOf(record) == -1) {
let condition = this.getRefreshCondition(type);
rec = await UserTaskRecModel.findOneAndUpdate({ roleId, group, taskType, ...condition }, { $setOnInsert: { code: genCode(8), received: [] }, $inc: { count }, $push: { records: record } }, { new: true, upsert: true }).lean();
}
return rec;
}
public static async findByRoleAndType(roleId: string, type: number) {
let condition = this.getRefreshCondition(type);
let rec: UserTaskRecType[] = await UserTaskRecModel.find({ roleId, ...condition }).lean();

View File

@@ -25,6 +25,12 @@ export class TaskParam {
aid?: number;
isDebug?: boolean;
oldCount?: number;
oldStar?: number;
hid?: number;
eplaceId?: number;
oldQuality?: number;
oldStoneLvs?: number[];
newStoneLvs?: number[];
}
export class TaskListReturn {

View File

@@ -871,6 +871,7 @@ function treatTaskGroup() {
let taskByGroup = new Map<number, { params: number[], ids: string[] }[]>(); // taskType => obj
for(let [taskType, tasks] of gameData.taskType) {
for(let obj of tasks) {
console.log('#####', taskType, obj.type, obj.id)
let dicTaskType = taskType2Desc.get(taskType);
let index = dicTaskType.param.split('&').indexOf(dicTaskType.condition);
let params = obj.taskParam.filter((_, i) => index != i);

View File

@@ -730,7 +730,7 @@ function setRandSeToSeidList(jewel: JewelType, equip: EPlace, list: number[]) {
}
}
function isRandSeUnLock(jewelId: number, randSeId: number, stones: Stone[]) {
export function isRandSeUnLock(jewelId: number, randSeId: number, stones: Stone[]) {
let dicJewel = gameData.jewel.get(jewelId);
let dicJewelCondition = getJewelConditionByLvAndSeId(dicJewel.lv, randSeId);
let stoneCnt = 0, stoneLv = 0;

View File

@@ -1,11 +1,11 @@
import { gameData } from './data';
import { gameData, getEquipSuitByHero } from './data';
import { DicTask } from './dictionary/DicTask';
import { TASK_TYPE, ABI_STAGE, WAR_TYPE, GUILD_JOB, TASK_SUM_TYPE } from '../consts';
import { UserTaskRecModel, UserTaskRecType } from '../db/UserTaskRec'
import { RoleType, RoleModel } from '../db/Role';
import { TaskParam, TaskListReturn } from '../domain/roleField/task';
import { getZeroPoint } from './timeUtil';
import { HeroType } from '../db/Hero';
import { EPlace, HeroType } from '../db/Hero';
import { ItemInter } from './interface';
import { DailyChallengesData } from '../domain/activityField/dailyChallengesField';
import { splitString } from './util';
@@ -31,6 +31,8 @@ import { GuildModel } from '../db/Guild';
import { RefreshTaskData } from '../domain/activityField/refreshTaskField';
import { ActivityRefreshTaskModel } from '../db/ActivityRefreshTask';
import { ActivityInRemote, transActivityInRemoteToModelType } from '../domain/activityField/activityField';
import { JewelType } from '../db/Jewel';
import { isRandSeUnLock } from './playerCe';
@@ -113,10 +115,7 @@ export async function checkTaskWithHero(roleId: string, taskType: number, hero:
pushMessage = await checkTask(roleId, taskType, 1, true, { count, oldCount });
}
else if (taskType == TASK_TYPE.HERO_QUALITY_UP) {
let dicHero = gameData.hero.get(hero.hid);
if (hero.quality - dicHero.quality == 1) { // 每个武将升品算一次
pushMessage = await checkTask(roleId, taskType, 1, true, {});
}
pushMessage = await checkTask(roleId, taskType, 1, true, { hid: hero.hid });
}
else if (taskType == TASK_TYPE.HERO_STAGE_UP) {
let dicHero = gameData.hero.get(hero.hid);
@@ -128,25 +127,128 @@ export async function checkTaskWithHero(roleId: string, taskType: number, hero:
else if (taskType == TASK_TYPE.HERO_FAVOUR_LV) {
pushMessage = await checkTask(roleId, taskType, 1, true, { favourLv: hero.favourLv, oldLv: args[0] })
}
else if (taskType == TASK_TYPE.EQUIP_BY_HERO) {
// // arg[0] 1穿上 -1脱下
// let { ePlace } = hero;
// let count = ePlace.filter(cur => cur.equip).length;
// pushMessage = await checkTask(roleId, taskType, args[0], true, { count, isPutOn: args[0], oldCount: args[1] });
}
else if (taskType == TASK_TYPE.EQUIP_STRENGTHEN) {
// args: 依次为原先的装备的强化等级
let { ePlace } = hero;
let index = 0;
for (let { lv } of ePlace) {
let p = await checkTask(roleId, taskType, 1, true, { oldLv: args[index++], lv });
pushMessage = pushMessage.concat(p);
return pushMessage
}
export async function checkTaskWithEplaces(roleId: string, taskType: number, oldEplace: EPlace[], newEplace: EPlace[], eplaceIds: number[], params?: Param) {
let pushMessage = new Array<TaskListReturn>();
if(taskType == TASK_TYPE.EQUIP_SUIT_SEID_NUM) {
let dicEquipSuit = getEquipSuitByHero(params.hid);
let oldSuitStars: number[] = [], newSuitStars: number[] = [];
for(let equipId of dicEquipSuit.equips) {
let oldEquip = oldEplace.find(cur => cur.equipId == equipId);
oldSuitStars.push(oldEquip? oldEquip.star: 0);
let newEquip = newEplace.find(cur => cur.equipId == equipId);
newSuitStars.push(newEquip? newEquip.star: 0);
}
let oldStar = Math.min(...oldSuitStars);
let newStar = Math.min(...newSuitStars);
let oldCount = 0, count = 0;
for(let { star } of dicEquipSuit.effect) {
if(oldStar >= star) oldCount++;
if(newStar >= star) count++;
}
pushMessage = await checkTask(roleId, taskType, 1, true, { oldCount, count });
}
else if (taskType == TASK_TYPE.EQUIP_COMPOSE_CNT) {
pushMessage = await checkTask(roleId, taskType, newEplace.length - oldEplace.length, true, {});
} else {
for(let eplaceId of eplaceIds) {
let oldEquip = oldEplace.find(cur => cur.id == eplaceId)||new EPlace(eplaceId, 0);
let newEquip = newEplace.find(cur => cur.id == eplaceId)||new EPlace(eplaceId, 0);
let result = await checkTaskWithEplace(roleId, taskType, oldEquip, newEquip, params);
pushMessage.push(...result);
}
}
return pushMessage
}
interface Param {
jewels?: JewelType[];
hid?: number;
}
export async function checkTaskWithEplace(roleId: string, taskType: number, oldEquip: EPlace, newEquip: EPlace, params?: Param) {
let pushMessage = new Array<TaskListReturn>();
if (taskType == TASK_TYPE.EQUIP_LV_TO) {
pushMessage = await checkTask(roleId, taskType, 1, true, { oldLv: oldEquip.lv, lv: newEquip.lv })
}
else if (taskType == TASK_TYPE.EQUIP_PUT_JEWEL) {
let jewels: JewelType[] = params.jewels;
let oldJewel = jewels.find(cur => cur && cur.seqId == oldEquip.jewel);
let oldLv = gameData.jewel.get(oldJewel?.id)?.lv || 0;
let newJewel = jewels.find(cur => cur && cur.seqId == newEquip.jewel);
let lv = gameData.jewel.get(newJewel?.id)?.lv || 0;
pushMessage = await checkTask(roleId, taskType, 1, true, { oldLv, lv });
}
else if (taskType == TASK_TYPE.EQUIP_PUT_STONE) {
let oldStoneCnt = oldEquip.stones.filter(cur => cur.stone != 0).length;
let newStoneCnt = newEquip.stones.filter(cur => cur.stone != 0).length;
pushMessage = await checkTask(roleId, taskType, 1, true, { oldCount: oldStoneCnt, count: newStoneCnt });
}
else if (taskType == TASK_TYPE.EQUIP_STAR_UP_TO) {
pushMessage = await checkTask(roleId, taskType, 1, true, { oldStar: oldEquip?.star||0, star: newEquip?.star||0 });
}
else if (taskType == TASK_TYPE.EQUIP_QUALITY_UP) {
pushMessage = await checkTask(roleId, taskType, 1, true, { hid: params.hid, eplaceId: newEquip.id });
}
else if (taskType == TASK_TYPE.EQUIP_QUALITY_UP_TO) {
pushMessage = await checkTask(roleId, taskType, 1, true, { oldQuality: oldEquip?.quality||0, quality: newEquip?.quality||0 });
}
else if (taskType == TASK_TYPE.EQUIP_PUT_JEWEL_CNT) {
if(oldEquip.jewel && !newEquip.jewel) {
pushMessage = await checkTask(roleId, taskType, -1, true, { });
} else if (!oldEquip.jewel && newEquip.jewel) {
pushMessage = await checkTask(roleId, taskType, 1, true, { });
}
}
else if (taskType == TASK_TYPE.EQUIP_PUT_STONE_CNT) {
let oldStoneCnt = oldEquip.stones.filter(cur => cur.stone != 0).length;
let newStoneCnt = newEquip.stones.filter(cur => cur.stone != 0).length;
if(oldStoneCnt > 0 && newStoneCnt == 0) {
pushMessage = await checkTask(roleId, taskType, -1, true, { });
} else if (oldStoneCnt == 0 && newStoneCnt > 0) {
pushMessage = await checkTask(roleId, taskType, 1, true, { });
}
}
else if (taskType == TASK_TYPE.EQUIP_STONE_CNT) {
let oldStoneCnt = oldEquip.stones.filter(cur => cur.stone != 0).length;
let newStoneCnt = newEquip.stones.filter(cur => cur.stone != 0).length;
pushMessage = await checkTask(roleId, taskType, newStoneCnt - oldStoneCnt, true, { });
}
else if (taskType == TASK_TYPE.EQUIP_STONE_CNT_LV) {
let oldStoneLvs = oldEquip.stones.map(cur => {
let dicStone = gameData.stone.get(cur.stone);
return dicStone?dicStone.lv: 0;
});
let newStoneLvs = newEquip.stones.map(cur => {
let dicStone = gameData.stone.get(cur.stone);
return dicStone?dicStone.lv: 0;
});
pushMessage = await checkTask(roleId, taskType, 1, true, { oldStoneLvs, newStoneLvs });
}
else if (taskType == TASK_TYPE.EQUIP_JEWEL_RANDSE_CNT) {
let jewels: JewelType[] = params.jewels;
let oldJewel = jewels.find(cur => cur && cur.seqId == oldEquip.jewel);
let oldRandSe = oldJewel.randSe||[];
let oldUnlockSeCnt = oldRandSe.filter(se => {
return isRandSeUnLock(oldJewel.id, se.id, oldEquip.stones);
}).length;
let newJewel = jewels.find(cur => cur && cur.seqId == newEquip.jewel);
let newRandSe = newJewel.randSe||[];
let newUnlockSeCnt = newRandSe.filter(se => {
return isRandSeUnLock(newJewel.id, se.id, newEquip.stones);
}).length;
pushMessage = await checkTask(roleId, taskType, 1, true, { oldCount: oldUnlockSeCnt, count: newUnlockSeCnt });
}
return pushMessage
}
// export async function checkTaskWithEquip(roleId: string, taskType: number, equip: EquipType, args: number[] = []) {
// let pushMessage = new Array<TaskListReturn>();
@@ -215,20 +317,6 @@ export async function checkTaskWithArgs(roleId: string, taskType: number, args:
pushMessage = await checkTask(roleId, taskType, -1, true, {});
}
}
else if (taskType == TASK_TYPE.EQUIP_JEWEL_STAGE) {
// // args 装上的, 卸下的
// let [putOnJewel, putOffJewel] = args;
// if (putOnJewel > 0) {
// let dicGood = gameData.goods.get(putOnJewel);
// let push = await checkTask(roleId, taskType, 1, true, { stage: dicGood.lvLimited });
// pushMessage.push(...push);
// }
// if (putOffJewel > 0) {
// let dicGood = gameData.goods.get(putOffJewel);
// let push = await checkTask(roleId, taskType, -1, true, { stage: dicGood.lvLimited });
// pushMessage.push(...push);
// }
}
else if (taskType == TASK_TYPE.CHAT) {
// args[0] 聊天type 1-系统 2-世界 3-军团 4-组队 5-私聊
pushMessage = await checkTask(roleId, taskType, 1, true, { chatType: args[0] })
@@ -340,6 +428,7 @@ export async function checkTaskRec(roleId: string, type: number, group: string,
let isMatch = true; // 条件是否满足
let checkHistory = false; // 是否检查历史
let checkRecord = ''; // 检查记录
switch (taskType) {
case TASK_TYPE.ROLE_TITLE:
isMatch = param.title >= taskParam[0] && param.oldTitle < taskParam[0];
@@ -351,8 +440,9 @@ export async function checkTaskRec(roleId: string, type: number, group: string,
case TASK_TYPE.HERO_QUALITY:
isMatch = taskParam[1] == param.quality;
break;
case TASK_TYPE.EQUIP_QUALITY:
isMatch = taskParam[1] <= param.quality;
case TASK_TYPE.HERO_QUALITY_UP:
isMatch = true;
checkRecord = `${param.hid}`;
break;
case TASK_TYPE.HERO_QUALITY_STAR_UP:
isMatch = taskParam[1] == param.quality && taskParam[2] == param.star;
@@ -369,20 +459,6 @@ export async function checkTaskRec(roleId: string, type: number, group: string,
case TASK_TYPE.HERO_CONNECT:
isMatch = taskParam[1] == param.connectLv;
break;
case TASK_TYPE.EQUIP_BY_HERO:
isMatch = false;
if (param.isPutOn == 1 && param.count >= taskParam[1] && param.oldCount < taskParam[1] ) { // 装上之后达到 +1
isMatch = true;
} else if (param.isPutOn == -1 && param.count < taskParam[1] && param.oldCount >= taskParam[1]) { // 脱下后不能达到 -1
isMatch = true;
}
break;
case TASK_TYPE.EQUIP_STRENGTHEN:
isMatch = param.oldLv < taskParam[1] && param.lv >= taskParam[1];
break;
case TASK_TYPE.EQUIP_JEWEL_STAGE:
isMatch = param.stage >= taskParam[1];
break;
case TASK_TYPE.CHAT:
isMatch = taskParam[0] == 0 || param.chatType == taskParam[0];
break;
@@ -431,6 +507,57 @@ export async function checkTaskRec(roleId: string, type: number, group: string,
case TASK_TYPE.GUILD_REFINE:
isMatch = taskParam[0] == 0 || param.quality == taskParam[0];
break;
case TASK_TYPE.EQUIP_LV_TO:
isMatch = param.lv >= taskParam[1] && param.oldLv < taskParam[1];
break;
case TASK_TYPE.EQUIP_PUT_JEWEL:
if(param.lv >= taskParam[1] && param.oldLv < taskParam[1]) {
isMatch = true;
} else if (param.lv < taskParam[1] && param.oldLv >= taskParam[1]) {
isMatch = true;
count = -1;
}
break;
case TASK_TYPE.EQUIP_PUT_STONE:
if(param.oldCount < taskParam[1] && param.count >= taskParam[1]) {
isMatch = true;
} else if (param.oldCount >= taskParam[1] && param.count < taskParam[1]) {
isMatch = true;
count = -1;
}
break;
case TASK_TYPE.EQUIP_STAR_UP_TO:
isMatch = param.oldStar < taskParam[1] && param.star >= taskParam[1];
break;
case TASK_TYPE.EQUIP_SUIT_SEID_NUM:
isMatch = param.oldCount < taskParam[1] && param.count >= taskParam[1];
break;
case TASK_TYPE.EQUIP_QUALITY_UP:
isMatch = true;
checkRecord = `${param.hid}_${param.eplaceId}`;
break;
case TASK_TYPE.EQUIP_QUALITY_UP_TO:
isMatch = param.oldQuality < taskParam[1] && param.quality >= taskParam[1];
break;
case TASK_TYPE.EQUIP_STONE_CNT_LV:
let oldCount = param.oldStoneLvs.filter(lv => lv >= taskParam[2]).length;
let newCount = param.newStoneLvs.filter(lv => lv >= taskParam[2]).length;
if(oldCount < taskParam[1] && newCount >= taskParam[1]) {
isMatch = true;
} else if (oldCount >= taskParam[1] && newCount < taskParam[1]) {
isMatch = false;
count = -1;
}
break;
case TASK_TYPE.EQUIP_JEWEL_RANDSE_CNT:
if(param.oldCount < taskParam[1] && param.count >= taskParam[1]) {
isMatch = true;
} else if (param.oldCount >= taskParam[1] && param.count < taskParam[1]) {
isMatch = true;
count = -1;
}
break;
}
// console.log('****isMatch', isMatch, checkHistory, type, taskType, group, count)
if (param.isDebug) {
@@ -439,8 +566,13 @@ export async function checkTaskRec(roleId: string, type: number, group: string,
if (isMatch) {
if (isInc) {
let rec = await UserTaskRecModel.incTaskRec(roleId, type, taskType, group, count);
return rec;
if(checkRecord != '') {
let rec = await UserTaskRecModel.checkRecordAndIncTaskRec(roleId, type, taskType, group, count, checkRecord);
return rec;
} else {
let rec = await UserTaskRecModel.incTaskRec(roleId, type, taskType, group, count);
return rec;
}
} else {
if (checkHistory) {
let rec = await UserTaskRecModel.checkHistoryAndSetTaskRec(roleId, type, taskType, group, count);
@@ -689,26 +821,7 @@ export async function accomplishTask(serverId: number, roleId: string, taskType:
// console.log('***** thirtyDay before', Date.now());
//30天任务统计
if (taskType === TASK_TYPE.HERO_QUALITY_STAR_UP ||
taskType === TASK_TYPE.HERO_QUALITY_TO_QUALITY_COUNT ||
taskType === TASK_TYPE.HERO_QUALITY_WAKE_UP_COUNT ||
taskType === TASK_TYPE.HERO_WAKE_UP_STAR_UP_COUNT ||
taskType === TASK_TYPE.HERO_WAKE_UP_COUNT ||
taskType === TASK_TYPE.HERO_QUALITY ||
taskType === TASK_TYPE.GUILD_TRAIN_COUNT ||
taskType === TASK_TYPE.HERO_UNLOCK ||
taskType === TASK_TYPE.GACHA_QUALITY_COUNT ||
taskType === TASK_TYPE.ROLE_TERAPH_STAGE_UP ||
taskType === TASK_TYPE.EQUIP_QUALITY_COUNT ||
taskType === TASK_TYPE.EQUIP_STRENGTHEN ||
taskType === TASK_TYPE.EQUIP_REFINE_LV ||
taskType === TASK_TYPE.HERO_STAGE_UP ||
taskType === TASK_TYPE.EQUIP_JEWEL_SUM ||
taskType === TASK_TYPE.EQUIP_JEWEL_STAGE ||
taskType === TASK_TYPE.EQUIP_SUIT_JEWEL_STAGE ||
taskType === TASK_TYPE.EQUIP_QUALITY
) {
{
allActivity = await findActivitiesByTypes([ACTIVITY_TYPE.THIRTY_DAYS]);
for (let activity of allActivity) {
let thirtyDaysActivity = new ThirtyDaysData(activity, createTime);
@@ -757,7 +870,7 @@ export async function accomplishTask(serverId: number, roleId: string, taskType:
let playerRecord = await ActivityPopUpShopModel.addTaskPushMessage(serverId, activity.activityId, roleId, task.id, task.taskType, count, beginTime, endTime);
popShopData.setPlayerRecords(playerRecord)
pushMessage = pushMessage.concat(popShopData);
} else if (taskType == TASK_TYPE.EQUIP_QUALITY_COUNT || taskType == TASK_TYPE.GACHA_QUALITY_COUNT || taskType == TASK_TYPE.GUILD_ACTIVITY) {//每天统计
} else if ( taskType == TASK_TYPE.GACHA_QUALITY_COUNT || taskType == TASK_TYPE.GUILD_ACTIVITY) {//每天统计
let recordDate = moment(new Date()).startOf('d').toDate()
let recordData: ActivityPopUpShopRecordModelType = await ActivityPopUpShopRecordModel.findRecordData(serverId, activity.activityId, roleId, task.id, task.taskType, recordDate)
let { addCount } = isComplete(roleId, task.taskType, task.taskParam, count, activity.activityId, parma, null);
@@ -918,15 +1031,6 @@ export function isComplete(_roleId: string, taskType: TASK_TYPE, taskParam: stri
let dicJob = gameData.job.get(paramObj.job);
addCount = (param[1] == dicJob.grade) ? count : 0;
break;
case TASK_TYPE.EQUIP_JEWEL_STAGE://count&stage&
addCount = (param[1] <= paramObj.stage) ? count : 0;
break;
case TASK_TYPE.EQUIP_SUIT_JEWEL_STAGE://count&stage&
addCount = (param[1] == paramObj.stage) ? count : 0;
break;
case TASK_TYPE.EQUIP_QUALITY:
addCount = param[1] <= paramObj.quality ? count : 0;
break;
case TASK_TYPE.ROLE_TITLE://重置数据
addCount = param[0] <= count ? count : 0;
@@ -934,30 +1038,9 @@ export function isComplete(_roleId: string, taskType: TASK_TYPE, taskParam: stri
case TASK_TYPE.GASHA:
addCount = count;
break;
case TASK_TYPE.EQUIP_STRENGTHEN:
for (let obj of paramObj) {
// obj.hid;//英雄di
// obj.oldLv;//栏位升级前等级
// obj.lv;//栏位升级后等级
// obj.id;//栏位id
if (param[1] > obj.oldLv && param[1] <= obj.lv) {
addCount++;
}
}
break;
case TASK_TYPE.EQUIP_REFINE_LV:
addCount = (param[1] == paramObj.lv) ? count : 0;
break;
case TASK_TYPE.EQUIP_REFINE:
addCount = count;
break;
case TASK_TYPE.BATTLE_MAIN:
addCount = (param[1] == paramObj.warId) ? 1 : 0;
break;
case TASK_TYPE.EQUIP_JEWEL_SUM:
addCount = count;
break;
case TASK_TYPE.GUILD_TRAIN:
addCount = count;
break;
@@ -972,9 +1055,6 @@ export function isComplete(_roleId: string, taskType: TASK_TYPE, taskParam: stri
}
break;
}
case TASK_TYPE.EQUIP_SUM:
addCount = count;
break;
case TASK_TYPE.HERO_LV://{ hid, lv}
{
let hid = paramObj.hid;
@@ -1141,13 +1221,6 @@ export function isComplete(_roleId: string, taskType: TASK_TYPE, taskParam: stri
record.push(hid)
break;
}
case TASK_TYPE.EQUIP_QUALITY_COUNT:
{
let quality = param[1]
let equips = paramObj.equips.filter(equip => { return equip.quality == quality })
addCount = equips.length;
break;
}
case TASK_TYPE.COM_BATTLE:
{
addCount = count;

View File

@@ -1142,7 +1142,7 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 22,
"taskType": 96,
"taskParam": "6&",
"achieveType": 23,
"achieveTaskName": "全副武装·壹",
@@ -1158,7 +1158,7 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 22,
"taskType": 96,
"taskParam": "12&",
"achieveType": 23,
"achieveTaskName": "全副武装·贰",
@@ -1174,7 +1174,7 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 22,
"taskType": 96,
"taskParam": "24&",
"achieveType": 23,
"achieveTaskName": "全副武装·叁",
@@ -1190,7 +1190,7 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 22,
"taskType": 96,
"taskParam": "36&",
"achieveType": 23,
"achieveTaskName": "全副武装·肆",
@@ -1206,7 +1206,7 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 25,
"taskType": 87,
"taskParam": "1&10&",
"achieveType": 25,
"achieveTaskName": "叮叮当当·壹",
@@ -1222,7 +1222,7 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 25,
"taskType": 87,
"taskParam": "6&10&",
"achieveType": 25,
"achieveTaskName": "叮叮当当·贰",
@@ -1238,7 +1238,7 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 25,
"taskType": 87,
"taskParam": "6&40&",
"achieveType": 25,
"achieveTaskName": "叮叮当当·叁",
@@ -1254,7 +1254,7 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 25,
"taskType": 87,
"taskParam": "6&80&",
"achieveType": 25,
"achieveTaskName": "叮叮当当·肆",
@@ -1270,7 +1270,7 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 25,
"taskType": 87,
"taskParam": "6&100&",
"achieveType": 25,
"achieveTaskName": "叮叮当当·伍",
@@ -1286,11 +1286,11 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 26,
"taskType": 99,
"taskParam": "1&",
"achieveType": 26,
"achieveTaskName": "颜值就是战力·壹",
"taskInfo": "1件装备镶嵌宝石",
"taskInfo": "1件装备镶嵌天晶",
"condition": 1,
"taskReward": "60001&10",
"point": 10
@@ -1302,11 +1302,11 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 26,
"taskParam": "6&",
"taskType": 88,
"taskParam": "24&9",
"achieveType": 26,
"achieveTaskName": "颜值就是战力·贰",
"taskInfo": "6件装备镶嵌宝石",
"taskInfo": "24件装备镶嵌9品天晶",
"condition": 6,
"taskReward": "60003&1",
"point": 20
@@ -1318,11 +1318,11 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 27,
"taskParam": "1&",
"taskType": 92,
"taskParam": "6&1&",
"achieveType": 27,
"achieveTaskName": "圣衣在手",
"taskInfo": "合成1件套装套装",
"taskInfo": "6名武将激活套装属性",
"condition": 1,
"taskReward": "17051&5000",
"point": 30
@@ -1334,11 +1334,11 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 30,
"taskParam": "1&",
"taskType": 90,
"taskParam": "1&2&",
"achieveType": 28,
"achieveTaskName": "炼他炼他·壹",
"taskInfo": "成功精炼1次",
"taskInfo": "1件装备升星至2星",
"condition": 1,
"taskReward": "17054&10",
"point": 5
@@ -1350,11 +1350,11 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 30,
"taskParam": "10&",
"taskType": 90,
"taskParam": "4&6&",
"achieveType": 28,
"achieveTaskName": "炼他炼他·贰",
"taskInfo": "成功精炼10次",
"taskInfo": "4件装备升星至6星",
"condition": 10,
"taskReward": "17054&100",
"point": 10
@@ -1366,11 +1366,11 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 31,
"taskType": 105,
"taskParam": "1&",
"achieveType": 29,
"achieveTaskName": "洗刷刷·壹",
"taskInfo": "洗炼1次",
"taskInfo": "天晶洗炼1次",
"condition": 1,
"taskReward": "17044&1",
"point": 10
@@ -1382,11 +1382,11 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 31,
"taskType": 105,
"taskParam": "10&",
"achieveType": 29,
"achieveTaskName": "洗刷刷·贰",
"taskInfo": "洗炼10次",
"taskInfo": "天晶洗炼10次",
"condition": 10,
"taskReward": "17045&1",
"point": 20
@@ -1398,11 +1398,11 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 32,
"taskParam": "1&1&",
"taskType": 103,
"taskParam": "1&2&",
"achieveType": 30,
"achieveTaskName": "颜值就是战力·壹",
"taskInfo": "镶嵌1个1阶宝石",
"taskInfo": "1个天晶的特性2被激活",
"condition": 1,
"taskReward": "60001&10",
"point": 30
@@ -1414,11 +1414,11 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 32,
"taskParam": "1&9&",
"taskType": 103,
"taskParam": "4&3&",
"achieveType": 30,
"achieveTaskName": "颜值就是战力·贰",
"taskInfo": "镶嵌1个9阶宝石",
"taskInfo": "4个天晶的特性3被激活",
"condition": 1,
"taskReward": "60006&1",
"point": 5
@@ -1430,11 +1430,11 @@
"tabName": "装备",
"subTab": 9,
"subTabName": "武备",
"taskType": 32,
"taskParam": "4&9&",
"taskType": 103,
"taskParam": "24&4&",
"achieveType": 30,
"achieveTaskName": "颜值就是战力·叁",
"taskInfo": "镶嵌4个9阶宝石",
"taskInfo": "24个天晶的特性4被激活",
"condition": 4,
"taskReward": "60003&1",
"point": 10
@@ -1921,22 +1921,6 @@
},
{
"id": 121,
"achieveTaskId": 121,
"tab": 8,
"tabName": "试炼",
"subTab": 14,
"subTabName": "挑战",
"taskType": 52,
"taskParam": "4&2&",
"achieveType": 46,
"achieveTaskName": "藏宝图上说……",
"taskInfo": "合成红品质的藏宝图2次",
"condition": 2,
"taskReward": "40002&100",
"point": 10
},
{
"id": 122,
"achieveTaskId": 122,
"tab": 8,
"tabName": "试炼",
@@ -1944,7 +1928,7 @@
"subTabName": "挑战",
"taskType": 53,
"taskParam": "2&",
"achieveType": 47,
"achieveType": 46,
"achieveTaskName": "你帮我,我帮你",
"taskInfo": "协助寻宝2次",
"condition": 2,
@@ -1952,7 +1936,7 @@
"point": 20
},
{
"id": 123,
"id": 122,
"achieveTaskId": 123,
"tab": 8,
"tabName": "试炼",
@@ -1960,7 +1944,7 @@
"subTabName": "挑战",
"taskType": 54,
"taskParam": "2&",
"achieveType": 48,
"achieveType": 47,
"achieveTaskName": "宝贝在哪",
"taskInfo": "组队寻宝2次",
"condition": 2,
@@ -1968,23 +1952,7 @@
"point": 30
},
{
"id": 124,
"achieveTaskId": 124,
"tab": 8,
"tabName": "试炼",
"subTab": 14,
"subTabName": "挑战",
"taskType": 55,
"taskParam": "4&2&",
"achieveType": 49,
"achieveTaskName": "找到宝贝了",
"taskInfo": "寻宝红品质2次",
"condition": 2,
"taskReward": "40002&250",
"point": 5
},
{
"id": 125,
"id": 123,
"achieveTaskId": 125,
"tab": 8,
"tabName": "试炼",
@@ -1992,7 +1960,7 @@
"subTabName": "挑战",
"taskType": 57,
"taskParam": "2&",
"achieveType": 50,
"achieveType": 48,
"achieveTaskName": "新挑战者入场",
"taskInfo": "PVP挑战2次",
"condition": 2,
@@ -2000,7 +1968,7 @@
"point": 10
},
{
"id": 126,
"id": 124,
"achieveTaskId": 126,
"tab": 8,
"tabName": "试炼",
@@ -2008,7 +1976,7 @@
"subTabName": "挑战",
"taskType": 58,
"taskParam": "2&",
"achieveType": 51,
"achieveType": 49,
"achieveTaskName": "荣耀之路开启",
"taskInfo": "PVP胜利2次",
"condition": 2,
@@ -2016,7 +1984,7 @@
"point": 10
},
{
"id": 127,
"id": 125,
"achieveTaskId": 127,
"tab": 9,
"tabName": "军团",
@@ -2024,7 +1992,7 @@
"subTabName": "军团",
"taskType": 64,
"taskParam": "1&",
"achieveType": 52,
"achieveType": 50,
"achieveTaskName": "人人为我",
"taskInfo": "军团捐献1次",
"condition": 1,
@@ -2032,7 +2000,7 @@
"point": 20
},
{
"id": 128,
"id": 126,
"achieveTaskId": 128,
"tab": 9,
"tabName": "军团",
@@ -2040,7 +2008,7 @@
"subTabName": "军团",
"taskType": 64,
"taskParam": "10&",
"achieveType": 52,
"achieveType": 51,
"achieveTaskName": "我为人人",
"taskInfo": "军团捐献10次",
"condition": 10,
@@ -2048,7 +2016,7 @@
"point": 30
},
{
"id": 129,
"id": 127,
"achieveTaskId": 129,
"tab": 9,
"tabName": "军团",
@@ -2056,7 +2024,7 @@
"subTabName": "军团",
"taskType": 65,
"taskParam": "2&",
"achieveType": 53,
"achieveType": 52,
"achieveTaskName": "开启宝箱",
"taskInfo": "领取2次军团活跃宝箱",
"condition": 2,
@@ -2064,7 +2032,7 @@
"point": 5
},
{
"id": 130,
"id": 128,
"achieveTaskId": 130,
"tab": 9,
"tabName": "军团",
@@ -2072,7 +2040,7 @@
"subTabName": "军团",
"taskType": 67,
"taskParam": "1&",
"achieveType": 54,
"achieveType": 53,
"achieveTaskName": "请点击帮我助力",
"taskInfo": "助力炼器堂研发加速1次",
"condition": 1,
@@ -2080,7 +2048,7 @@
"point": 10
},
{
"id": 131,
"id": 129,
"achieveTaskId": 131,
"tab": 9,
"tabName": "军团",
@@ -2088,7 +2056,7 @@
"subTabName": "军团",
"taskType": 68,
"taskParam": "2&",
"achieveType": 55,
"achieveType": 54,
"achieveTaskName": "Boss就这",
"taskInfo": "练兵场军团成功挑战2次BOSS",
"condition": 2,
@@ -2096,7 +2064,7 @@
"point": 10
},
{
"id": 132,
"id": 130,
"achieveTaskId": 132,
"tab": 9,
"tabName": "军团",
@@ -2104,7 +2072,7 @@
"subTabName": "军团",
"taskType": 70,
"taskParam": "2&",
"achieveType": 56,
"achieveType": 55,
"achieveTaskName": "大吉大利",
"taskInfo": "挑战练兵场2次",
"condition": 2,
@@ -2112,7 +2080,7 @@
"point": 20
},
{
"id": 133,
"id": 131,
"achieveTaskId": 133,
"tab": 9,
"tabName": "军团",
@@ -2120,7 +2088,7 @@
"subTabName": "军团",
"taskType": 72,
"taskParam": "1&",
"achieveType": 57,
"achieveType": 56,
"achieveTaskName": "我们是……一团人了",
"taskInfo": "加入军团",
"condition": 1,

View File

@@ -112,7 +112,7 @@
{
"id": 11,
"mainTaskId": 11,
"taskType": 23,
"taskType": 97,
"taskInfo": "2名武将装备6件装备",
"taskParam": "2&6",
"taskStage": 2,
@@ -244,8 +244,8 @@
{
"id": 23,
"mainTaskId": 23,
"taskType": 27,
"taskInfo": "合成一件套装",
"taskType": 99,
"taskInfo": "镶嵌1颗天晶",
"taskParam": "1&",
"taskStage": 4,
"taskReward": "17051&500",
@@ -255,12 +255,12 @@
{
"id": 24,
"mainTaskId": 24,
"taskType": 30,
"taskInfo": "装备成功精炼2次",
"taskParam": "2&",
"taskType": 90,
"taskInfo": "4件装备升星至4星",
"taskParam": "4&4",
"taskStage": 4,
"taskReward": "17054&200",
"condition": 2,
"condition": 4,
"skip": "125&"
},
{
@@ -442,7 +442,7 @@
{
"id": 41,
"mainTaskId": 41,
"taskType": 25,
"taskType": 87,
"taskInfo": "50件装备强化至35级",
"taskParam": "50&35",
"taskStage": 7,
@@ -453,12 +453,12 @@
{
"id": 42,
"mainTaskId": 42,
"taskType": 28,
"taskInfo": "拥有3套套装",
"taskParam": "3&",
"taskType": 92,
"taskInfo": "6名武将各激活2条词条属性",
"taskParam": "6&2",
"taskStage": 7,
"taskReward": "17051&1000",
"condition": 3,
"condition": 6,
"skip": "46&"
},
{
@@ -508,9 +508,9 @@
{
"id": 47,
"mainTaskId": 47,
"taskType": 32,
"taskInfo": "镶嵌6个3阶宝石",
"taskParam": "6&3",
"taskType": 102,
"taskInfo": "3名武将镶嵌6个5阶地玉",
"taskParam": "3&6&5",
"taskStage": 8,
"taskReward": "71008&10",
"condition": 6,
@@ -651,8 +651,8 @@
{
"id": 60,
"mainTaskId": 60,
"taskType": 30,
"taskInfo": "装备成功炼5次",
"taskType": 107,
"taskInfo": "天晶成功炼5次",
"taskParam": "5&",
"taskStage": 10,
"taskReward": "17045&10",

View File

@@ -838,5 +838,215 @@
"content": 0,
"condition": "RMB",
"sumType": 1
},
{
"id": 87,
"name": "装备",
"info": "x件装备强化至x级",
"param": "equipcount&lv&",
"string": "装备数量&强化等级&",
"content": 0,
"condition": "equipcount",
"sumType": 1
},
{
"id": 88,
"name": "装备",
"info": "x件装备镶嵌X阶天晶石",
"param": "equipcount&lv&",
"string": "装备数量&天晶品阶",
"content": "必须同时镶嵌中,脱下再嵌不算",
"condition": "equipcount",
"sumType": 1
},
{
"id": 89,
"name": "装备",
"info": "x件装备镶嵌X个地玉石",
"param": "equipcount&stonecount",
"string": "装备数量&各镶嵌的地玉数量",
"content": 0,
"condition": "equipcount",
"sumType": 1
},
{
"id": 90,
"name": "装备",
"info": "x件装备升至X星",
"param": "equipcount&starlv",
"string": "装备数量&装备星级",
"content": 0,
"condition": "equipcount",
"sumType": 1
},
{
"id": 91,
"name": "装备",
"info": "x件装备升星X次",
"param": "equipcount&count&",
"string": "装备数量&升星次数&",
"content": 0,
"condition": "equipcount",
"sumType": 1
},
{
"id": 92,
"name": "装备",
"info": "x名武将激活X条套装属性",
"param": "herocount&count&",
"string": "武将数量&单名武将激活的套装词条数&",
"content": 0,
"condition": "herocount",
"sumType": 1
},
{
"id": 93,
"name": "装备",
"info": "x件装备进行升品",
"param": "equipcount&",
"string": "装备数量&",
"content": 0,
"condition": "equipcount",
"sumType": 1
},
{
"id": 94,
"name": "装备",
"info": "装备升品X次",
"param": "count&",
"string": "升品次数",
"content": 0,
"condition": "count",
"sumType": 2
},
{
"id": 95,
"name": "装备",
"info": "X件装备升品至Y品质",
"param": "equipcount&quality&",
"string": "装备数量&装备品质&",
"content": 0,
"condition": "equipcount",
"sumType": 1
},
{
"id": 96,
"name": "装备",
"info": "装备X件装备",
"param": "equipcount&",
"string": "装备数量&",
"content": 0,
"condition": "equipcount",
"sumType": 1
},
{
"id": 97,
"name": "装备",
"info": "x名武将各装备x件装备",
"param": "herocount&equipcount&",
"string": "武将数量&单名武将装备的装备数量&",
"content": 0,
"condition": "herocount",
"sumType": 1
},
{
"id": 98,
"name": "装备",
"info": "装备强化X次",
"param": "count&",
"string": "强化次数",
"content": 0,
"condition": "count",
"sumType": 2
},
{
"id": 99,
"name": "装备",
"info": "X件装备镶嵌天晶",
"param": "equipcount&",
"string": "装备数量",
"content": 0,
"condition": "count",
"sumType": 1
},
{
"id": 100,
"name": "装备",
"info": "X件装备镶嵌地玉",
"param": "equipcount&",
"string": "装备数量",
"content": 0,
"condition": "count",
"sumType": 1
},
{
"id": 101,
"name": "装备",
"info": "镶嵌X个地玉",
"param": "count&",
"string": "地玉数量",
"content": 0,
"condition": "count",
"sumType": 1
},
{
"id": 102,
"name": "装备",
"info": "X件装备镶嵌X个大于等于X阶地玉",
"param": "equipcount&count&stonelv",
"string": "装备数量&单件装备地玉数量&地玉品阶",
"content": 0,
"condition": "equipcount",
"sumType": 1
},
{
"id": 103,
"name": "装备",
"info": "X个天晶的Y条特性词条被激活",
"param": "jewelcount&count",
"string": "天晶数量&词条数量",
"content": 0,
"condition": "count",
"sumType": 1
},
{
"id": 104,
"name": "晶玉",
"info": "地玉合成X次",
"param": "count&",
"string": "地玉合成次数",
"content": 0,
"condition": "count",
"sumType": 2
},
{
"id": 105,
"name": "晶玉",
"info": "天晶洗炼X次",
"param": "count&",
"string": "天晶洗炼次数",
"content": 0,
"condition": "count",
"sumType": 2
},
{
"id": 106,
"name": "晶玉",
"info": "天晶淬炼X次",
"param": "count&",
"string": "天晶淬炼次数",
"content": 0,
"condition": "count",
"sumType": 2
},
{
"id": 107,
"name": "晶玉",
"info": "天晶成功淬炼X次",
"param": "count&",
"string": "天晶淬炼成功次数",
"content": 0,
"condition": "count",
"sumType": 2
}
]