✨ feat(gvg): 任务
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { Application, BackendSession, ChannelService, HandlerService, pinus } from "pinus";
|
import { Application, BackendSession, ChannelService, HandlerService, pinus } from "pinus";
|
||||||
import { GVG_ITEM, DATA_NAME, GVG_ACTIVE_TYPE, GVG_PERIOD, GVG_SERVER_TYPE, ITEM_CHANGE_REASON, LEAGUE_JOB, LEAGUE_MANAGE_TYPE, STATUS, GVG_REC_TYPE } from "../../../consts";
|
import { GVG_ITEM, DATA_NAME, GVG_ACTIVE_TYPE, GVG_PERIOD, GVG_SERVER_TYPE, ITEM_CHANGE_REASON, LEAGUE_JOB, LEAGUE_MANAGE_TYPE, STATUS, GVG_REC_TYPE, TASK_TYPE } from "../../../consts";
|
||||||
import { GVGLeagueModel } from "../../../db/GVGLeague";
|
import { GVGLeagueModel } from "../../../db/GVGLeague";
|
||||||
import { GVGLeaguePrepareModel } from "../../../db/GVGLeaguePrepare";
|
import { GVGLeaguePrepareModel } from "../../../db/GVGLeaguePrepare";
|
||||||
import { GVGMainData, LeagueDistributeInfo, LeagueMemberDistributeInfo, LeagueMemberListInfo } from "../../../domain/gvgField/returnData";
|
import { GVGMainData, LeagueDistributeInfo, LeagueMemberDistributeInfo, LeagueMemberListInfo } from "../../../domain/gvgField/returnData";
|
||||||
@@ -20,6 +20,7 @@ import { addGVGReward, handleGVGCost } from "../../../services/gvg/gvgItemServic
|
|||||||
import { RewardInter } from "../../../pubUtils/interface";
|
import { RewardInter } from "../../../pubUtils/interface";
|
||||||
import { getGVGCities } from "../../../services/gvg/gvgBattleService";
|
import { getGVGCities } from "../../../services/gvg/gvgBattleService";
|
||||||
import { GVGRecModel } from "../../../db/GVGRec";
|
import { GVGRecModel } from "../../../db/GVGRec";
|
||||||
|
import { checkGVGTask } from "../../../services/task/taskService";
|
||||||
|
|
||||||
export default function (app: Application) {
|
export default function (app: Application) {
|
||||||
new HandlerService(app, {});
|
new HandlerService(app, {});
|
||||||
@@ -250,6 +251,38 @@ export class GVGHandler {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 领取任务奖励
|
||||||
|
async receiveTask(msg: { taskId: number }, session: BackendSession) {
|
||||||
|
const roleId: string = session.get('roleId');
|
||||||
|
const guildCode: string = session.get('guildCode');
|
||||||
|
const roleName: string = session.get('roleName');
|
||||||
|
const sid: string = session.get('sid');
|
||||||
|
const { taskId } = msg;
|
||||||
|
|
||||||
|
let dicGVGTask = gameData.gvgTask.get(taskId);
|
||||||
|
if(!dicGVGTask) return resResult(STATUS.DIC_DATA_NOT_FOUND);
|
||||||
|
let { configId } = getGVGConfig();
|
||||||
|
|
||||||
|
const myLeague = await GVGLeagueModel.findLeagueByGuild(guildCode);
|
||||||
|
if(!myLeague) return resResult(STATUS.GVG_LEAGUE_NOT_EXIST);
|
||||||
|
|
||||||
|
// 检查
|
||||||
|
let rec = await GVGUserTaskModel.findByTaskId(configId, myLeague.leagueCode, roleId, taskId);
|
||||||
|
if(!rec || rec.count < dicGVGTask.condition) return resResult(STATUS.GVG_TASK_NOT_ENOUGH);
|
||||||
|
if(rec.status == 2) return resResult(STATUS.GVG_TASK_HAS_RECEIVED);
|
||||||
|
|
||||||
|
rec = await GVGUserTaskModel.receiveTask(configId, myLeague.leagueCode, roleId, taskId);
|
||||||
|
let leagueGoods = await addGVGReward(roleId, roleName, myLeague.leagueCode, sid, dicGVGTask.leagueReward, dicGVGTask.reward, ITEM_CHANGE_REASON.GVG_RECEIVE_TASK);
|
||||||
|
|
||||||
|
return resResult(STATUS.SUCCESS, {
|
||||||
|
curTask: {
|
||||||
|
id: rec.id,
|
||||||
|
status: rec.status
|
||||||
|
},
|
||||||
|
leagueGoods
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 千机阁数据
|
// 千机阁数据
|
||||||
async getTech(msg: {}, session: BackendSession) {
|
async getTech(msg: {}, session: BackendSession) {
|
||||||
const roleId = session.get('roleId');
|
const roleId = session.get('roleId');
|
||||||
@@ -321,6 +354,7 @@ export class GVGHandler {
|
|||||||
|
|
||||||
// 千机阁解锁
|
// 千机阁解锁
|
||||||
async activate(msg: { techId: number, battleFeats: number }, session: BackendSession) {
|
async activate(msg: { techId: number, battleFeats: number }, session: BackendSession) {
|
||||||
|
const serverId = session.get('serverId');
|
||||||
const roleId = session.get('roleId');
|
const roleId = session.get('roleId');
|
||||||
const guildCode = session.get('guildCode');
|
const guildCode = session.get('guildCode');
|
||||||
const sid = session.get('sid');
|
const sid = session.get('sid');
|
||||||
@@ -359,6 +393,7 @@ export class GVGHandler {
|
|||||||
|
|
||||||
// 添加 活跃
|
// 添加 活跃
|
||||||
let active = await addGVGTechActive(myLeague.leagueCode, roleId);
|
let active = await addGVGTechActive(myLeague.leagueCode, roleId);
|
||||||
|
checkGVGTask(serverId, roleId, sid, configId, myLeague.leagueCode, TASK_TYPE.GVG_TECH, { count: 1 });
|
||||||
|
|
||||||
return resResult(STATUS.SUCCESS, {
|
return resResult(STATUS.SUCCESS, {
|
||||||
active,
|
active,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Application, BackendSession, ChannelService, HandlerService } from "pinus";
|
import { Application, BackendSession, ChannelService, HandlerService } from "pinus";
|
||||||
import { GVG_ACTIVE_TYPE, GVG_ITEM, GVG_ITEM_TYPE, GVG_PERIOD, GVG_RESOURCE_TYPE, ITEM_CHANGE_REASON, MAIL_TYPE, STATUS } from "../../../consts";
|
import { GVG_ACTIVE_TYPE, GVG_ITEM, GVG_ITEM_TYPE, GVG_PERIOD, GVG_RESOURCE_TYPE, ITEM_CHANGE_REASON, MAIL_TYPE, STATUS, TASK_TYPE } from "../../../consts";
|
||||||
import { GVGLeagueModel } from "../../../db/GVGLeague";
|
import { GVGLeagueModel } from "../../../db/GVGLeague";
|
||||||
import { GVGLeagueFarmModel, GVGLeagueFarmType } from "../../../db/GVGLeagueFarm";
|
import { GVGLeagueFarmModel, GVGLeagueFarmType } from "../../../db/GVGLeagueFarm";
|
||||||
import { GVGLeagueFarmRecModel } from "../../../db/GVGLeagueFarmRec";
|
import { GVGLeagueFarmRecModel } from "../../../db/GVGLeagueFarmRec";
|
||||||
@@ -17,6 +17,7 @@ import { addGVGActive, addResource, getCostSeedReward, getItemIdOfSeedType, getL
|
|||||||
import { getGVGConfig, getGVGPeriodData } from "../../../services/gvg/gvgService";
|
import { getGVGConfig, getGVGPeriodData } from "../../../services/gvg/gvgService";
|
||||||
import { sendMailByContent } from "../../../services/mailService";
|
import { sendMailByContent } from "../../../services/mailService";
|
||||||
import { getAllServerName, getRoleOnlineInfo } from "../../../services/redisService";
|
import { getAllServerName, getRoleOnlineInfo } from "../../../services/redisService";
|
||||||
|
import { checkGVGTask } from "../../../services/task/taskService";
|
||||||
|
|
||||||
|
|
||||||
export default function (app: Application) {
|
export default function (app: Application) {
|
||||||
@@ -158,7 +159,7 @@ export class GVGProduceHandler {
|
|||||||
// 种田
|
// 种田
|
||||||
async plant(msg: { farmId: number, seeds: { fieldId: number, seedType: number }[] }, session: BackendSession) {
|
async plant(msg: { farmId: number, seeds: { fieldId: number, seedType: number }[] }, session: BackendSession) {
|
||||||
const roleId = session.get('roleId');
|
const roleId = session.get('roleId');
|
||||||
const roleName = session.get('roleName');
|
const serverId = session.get('serverId');
|
||||||
const guildCode = session.get('guildCode');
|
const guildCode = session.get('guildCode');
|
||||||
const sid = session.get('sid');
|
const sid = session.get('sid');
|
||||||
|
|
||||||
@@ -196,6 +197,7 @@ export class GVGProduceHandler {
|
|||||||
const plantResult = await GVGLeagueFarmModel.plant(configId, myLeague.leagueCode, farmId, updateFields, roleId);
|
const plantResult = await GVGLeagueFarmModel.plant(configId, myLeague.leagueCode, farmId, updateFields, roleId);
|
||||||
await rollbackUnPlantFields(cost, plantResult, session, myLeague.leagueCode); // 可能会有田已经被其他人占领的情况,将种子还回去
|
await rollbackUnPlantFields(cost, plantResult, session, myLeague.leagueCode); // 可能会有田已经被其他人占领的情况,将种子还回去
|
||||||
await GVGLeagueFarmRecModel.insertRecs(plantResult);
|
await GVGLeagueFarmRecModel.insertRecs(plantResult);
|
||||||
|
checkGVGTask(serverId, roleId, sid, configId, myLeague.leagueCode, TASK_TYPE.GVG_FARM, { count: 1 });
|
||||||
|
|
||||||
return resResult(STATUS.SUCCESS, {
|
return resResult(STATUS.SUCCESS, {
|
||||||
...await getLeagueFarmShowResult(myLeague.leagueCode, roleId, farmId)
|
...await getLeagueFarmShowResult(myLeague.leagueCode, roleId, farmId)
|
||||||
@@ -324,6 +326,7 @@ export class GVGProduceHandler {
|
|||||||
const roleName = session.get('roleName');
|
const roleName = session.get('roleName');
|
||||||
const guildCode = session.get('guildCode');
|
const guildCode = session.get('guildCode');
|
||||||
const sid = session.get('sid');
|
const sid = session.get('sid');
|
||||||
|
const serverId = session.get('serverId');
|
||||||
|
|
||||||
const { farmId, fieldId, result } = msg;
|
const { farmId, fieldId, result } = msg;
|
||||||
let { configId, period } = getGVGPeriodData();
|
let { configId, period } = getGVGPeriodData();
|
||||||
@@ -367,6 +370,7 @@ export class GVGProduceHandler {
|
|||||||
let leagueGoods = await addGVGReward(roleId, roleName, myLeague.leagueCode, sid, leagueReward, reward, ITEM_CHANGE_REASON.HARVEST)
|
let leagueGoods = await addGVGReward(roleId, roleName, myLeague.leagueCode, sid, leagueReward, reward, ITEM_CHANGE_REASON.HARVEST)
|
||||||
// 活跃
|
// 活跃
|
||||||
const active = await addGVGActive(myLeague.leagueCode, roleId, GVG_ACTIVE_TYPE.COST_PRODUCE_COIN, produceCoin);
|
const active = await addGVGActive(myLeague.leagueCode, roleId, GVG_ACTIVE_TYPE.COST_PRODUCE_COIN, produceCoin);
|
||||||
|
checkGVGTask(serverId, roleId, sid, configId, myLeague.leagueCode, TASK_TYPE.GVG_FARM, { count: 1 });
|
||||||
|
|
||||||
return resResult(STATUS.SUCCESS, {
|
return resResult(STATUS.SUCCESS, {
|
||||||
...await getLeagueFarmShowResult(myLeague.leagueCode, roleId, farmId, false),
|
...await getLeagueFarmShowResult(myLeague.leagueCode, roleId, farmId, false),
|
||||||
@@ -449,6 +453,7 @@ export class GVGProduceHandler {
|
|||||||
const roleName = session.get('roleName');
|
const roleName = session.get('roleName');
|
||||||
const guildCode = session.get('guildCode');
|
const guildCode = session.get('guildCode');
|
||||||
const sid = session.get('sid');
|
const sid = session.get('sid');
|
||||||
|
const serverId = session.get('serverId');
|
||||||
|
|
||||||
const { farmId, fieldId, result } = msg;
|
const { farmId, fieldId, result } = msg;
|
||||||
let { configId, period } = getGVGPeriodData();
|
let { configId, period } = getGVGPeriodData();
|
||||||
@@ -486,6 +491,7 @@ export class GVGProduceHandler {
|
|||||||
let leagueGoods = await addGVGReward(roleId, roleName, myLeague.leagueCode, sid, leagueReward, reward, ITEM_CHANGE_REASON.HARVEST)
|
let leagueGoods = await addGVGReward(roleId, roleName, myLeague.leagueCode, sid, leagueReward, reward, ITEM_CHANGE_REASON.HARVEST)
|
||||||
// 活跃
|
// 活跃
|
||||||
const active = await addGVGActive(myLeague.leagueCode, roleId, GVG_ACTIVE_TYPE.COST_PRODUCE_COIN, produceCoin);
|
const active = await addGVGActive(myLeague.leagueCode, roleId, GVG_ACTIVE_TYPE.COST_PRODUCE_COIN, produceCoin);
|
||||||
|
checkGVGTask(serverId, roleId, sid, configId, myLeague.leagueCode, TASK_TYPE.GVG_FARM, { count: 1 });
|
||||||
|
|
||||||
return resResult(STATUS.SUCCESS, {
|
return resResult(STATUS.SUCCESS, {
|
||||||
...await getLeagueFarmShowResult(myLeague.leagueCode, roleId, farmId, false),
|
...await getLeagueFarmShowResult(myLeague.leagueCode, roleId, farmId, false),
|
||||||
|
|||||||
@@ -15,12 +15,13 @@ import { SevenDaysData } from "../../domain/activityField/sevenDaysField";
|
|||||||
import { ThirtyDaysData } from "../../domain/activityField/thirtyDaysField";
|
import { ThirtyDaysData } from "../../domain/activityField/thirtyDaysField";
|
||||||
import { TreasureHuntData } from "../../domain/activityField/treasureHuntField";
|
import { TreasureHuntData } from "../../domain/activityField/treasureHuntField";
|
||||||
import { TaskListReturn, TaskParam, TaskParamInter, UpdateTaskParam } from "../../domain/roleField/task";
|
import { TaskListReturn, TaskParam, TaskParamInter, UpdateTaskParam } from "../../domain/roleField/task";
|
||||||
import { gameData, getDicBlueprtById, getEquipSuitByHero } from "../../pubUtils/data";
|
import { gameData, getDicBlueprtById, getEquipSuitByHero, getGVGTasksByType } from "../../pubUtils/data";
|
||||||
import { getZeroPoint } from "../../pubUtils/timeUtil";
|
import { getZeroPoint } from "../../pubUtils/timeUtil";
|
||||||
import { getActivityByServerId } from "../activity/activityService";
|
import { getActivityByServerId } from "../activity/activityService";
|
||||||
import { getRoleCreateTime, getRoleOnlineInfo, getServerCreateTime } from "../redisService";
|
import { getRoleCreateTime, getRoleOnlineInfo, getServerCreateTime } from "../redisService";
|
||||||
import { getEquipById, getJewelByEquip, isRandSeUnLock } from "../equipService";
|
import { getEquipById, getJewelByEquip, isRandSeUnLock } from "../equipService";
|
||||||
import { sendMessageToUserWithSuc } from "../pushService";
|
import { sendMessageToUserWithSuc } from "../pushService";
|
||||||
|
import { GVGUserTaskModel } from "../../db/GVGUserTask";
|
||||||
|
|
||||||
export class CheckTask {
|
export class CheckTask {
|
||||||
serverId: number; // 区id
|
serverId: number; // 区id
|
||||||
@@ -29,8 +30,12 @@ export class CheckTask {
|
|||||||
roleCreateTime: number; // 玩家的创建时间
|
roleCreateTime: number; // 玩家的创建时间
|
||||||
serverCreateTime: number; // 服务器的创建时间
|
serverCreateTime: number; // 服务器的创建时间
|
||||||
|
|
||||||
|
configId?: number;
|
||||||
|
leagueCode?: string;
|
||||||
|
|
||||||
taskPushMessages: TaskListReturn[] = [];
|
taskPushMessages: TaskListReturn[] = [];
|
||||||
activityTaskPushMessages = [];
|
activityTaskPushMessages = [];
|
||||||
|
gvgTaskPushMessages = [];
|
||||||
|
|
||||||
tasks: CheckSingleTask[] = [];
|
tasks: CheckSingleTask[] = [];
|
||||||
|
|
||||||
@@ -45,6 +50,11 @@ export class CheckTask {
|
|||||||
this.tasks.push(task);
|
this.tasks.push(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setLeague(configId: number, leagueCode: string) {
|
||||||
|
this.configId = configId;
|
||||||
|
this.leagueCode = leagueCode;
|
||||||
|
}
|
||||||
|
|
||||||
public async saveAndPush(sid?: string) {
|
public async saveAndPush(sid?: string) {
|
||||||
for(let task of this.tasks) {
|
for(let task of this.tasks) {
|
||||||
await task.check();
|
await task.check();
|
||||||
@@ -92,6 +102,9 @@ export class CheckTask {
|
|||||||
if (this.taskPushMessages.length > 0) {
|
if (this.taskPushMessages.length > 0) {
|
||||||
sendMessageToUserWithSuc(roleId, PUSH_ROUTE.TASK_UPDATE,this.taskPushMessages, sid);
|
sendMessageToUserWithSuc(roleId, PUSH_ROUTE.TASK_UPDATE,this.taskPushMessages, sid);
|
||||||
}
|
}
|
||||||
|
if(this.gvgTaskPushMessages.length > 0) {
|
||||||
|
sendMessageToUserWithSuc(roleId, PUSH_ROUTE.GVG_TASK_UPDATE,this.gvgTaskPushMessages, sid);
|
||||||
|
}
|
||||||
if (this.activityTaskPushMessages.length > 0) {
|
if (this.activityTaskPushMessages.length > 0) {
|
||||||
sendMessageToUserWithSuc(roleId, PUSH_ROUTE.ACTIVITY_TASK_UPDATE, this.activityTaskPushMessages, sid);
|
sendMessageToUserWithSuc(roleId, PUSH_ROUTE.ACTIVITY_TASK_UPDATE, this.activityTaskPushMessages, sid);
|
||||||
}
|
}
|
||||||
@@ -123,6 +136,10 @@ export class CheckSingleTask {
|
|||||||
this.parent.taskPushMessages.push(...param);
|
this.parent.taskPushMessages.push(...param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private addGVGTaskPushMessage(...param: {id: number, count: number}[]) {
|
||||||
|
this.parent.gvgTaskPushMessages.push(...param);
|
||||||
|
}
|
||||||
|
|
||||||
private addActivityTaskPushMessage(...param: any[]) {
|
private addActivityTaskPushMessage(...param: any[]) {
|
||||||
this.parent.activityTaskPushMessages.push(...param);
|
this.parent.activityTaskPushMessages.push(...param);
|
||||||
}
|
}
|
||||||
@@ -177,6 +194,21 @@ export class CheckSingleTask {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 联军任务
|
||||||
|
let dicGVGTasks = getGVGTasksByType(taskType);
|
||||||
|
console.log('#####', taskType, dicGVGTasks)
|
||||||
|
for(let { taskId, taskType, taskParam } of dicGVGTasks) {
|
||||||
|
let taskUpdateParam = await this.checkIsMatch(taskParam, async () => []);
|
||||||
|
if (taskUpdateParam) {
|
||||||
|
let rec = await GVGUserTaskModel.setOrIncTask(this.parent.configId, this.parent.leagueCode, roleId, taskType, taskId, taskUpdateParam);
|
||||||
|
if (!rec) continue;
|
||||||
|
|
||||||
|
if(rec.status == 1) {
|
||||||
|
this.addGVGTaskPushMessage({ id: taskId, count: rec.count });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 检查活动任务
|
// 检查活动任务
|
||||||
let activities = await getActivityByServerId(serverId);
|
let activities = await getActivityByServerId(serverId);
|
||||||
for(let activity of activities) {
|
for(let activity of activities) {
|
||||||
@@ -1404,6 +1436,24 @@ export class CheckSingleTask {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case TASK_TYPE.GVG_FARM: // 132. 农庄种植/矿山采集/木堆砍柴
|
||||||
|
{
|
||||||
|
let { count } = param;
|
||||||
|
result = { inc: count };
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TASK_TYPE.GVG_VESTIGE: // 133. 中原遗迹挑战
|
||||||
|
{
|
||||||
|
let { count } = param;
|
||||||
|
result = { inc: count };
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TASK_TYPE.GVG_TECH: // 134. 千机阁捐献
|
||||||
|
{
|
||||||
|
let { count } = param;
|
||||||
|
result = { inc: count };
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import { checkPopUpCondition, checkPopUpConditionInCreateHero, checkPopUpConditi
|
|||||||
import { sendMessageToUserWithSuc } from '../pushService';
|
import { sendMessageToUserWithSuc } from '../pushService';
|
||||||
import { getGoldId } from '../role/rewardService';
|
import { getGoldId } from '../role/rewardService';
|
||||||
import { GachaResultIndb } from '../../domain/activityField/gachaField';
|
import { GachaResultIndb } from '../../domain/activityField/gachaField';
|
||||||
import { ActivityPopUpShopRecModel } from '../../db/ActivityPopUpShopRec';
|
|
||||||
|
|
||||||
export async function checkTaskWithRoles(roleId: string, sid: string, taskType: TASK_TYPE, roles: RoleType[]) {
|
export async function checkTaskWithRoles(roleId: string, sid: string, taskType: TASK_TYPE, roles: RoleType[]) {
|
||||||
for (let role of roles) {
|
for (let role of roles) {
|
||||||
@@ -43,6 +42,13 @@ export async function checkTask(serverId: number, roleId: string, sid: string, t
|
|||||||
await task.saveAndPush(sid);
|
await task.saveAndPush(sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function checkGVGTask(serverId: number, roleId: string, sid: string, configId: number, leagueCode: string, taskType: TASK_TYPE, args?: TaskParamInter) {
|
||||||
|
let task = new CheckTask(serverId, roleId);
|
||||||
|
task.setParam(taskType, args);
|
||||||
|
task.setLeague(configId, leagueCode);
|
||||||
|
await task.saveAndPush(sid);
|
||||||
|
}
|
||||||
|
|
||||||
export async function checkTaskInEntry(serverId: number, roleId: string, sid: string, role: RoleType) {
|
export async function checkTaskInEntry(serverId: number, roleId: string, sid: string, role: RoleType) {
|
||||||
let task = new CheckTask(serverId, roleId);
|
let task = new CheckTask(serverId, roleId);
|
||||||
task.setRole(role);
|
task.setRole(role);
|
||||||
|
|||||||
@@ -179,4 +179,5 @@ export const PUSH_ROUTE = {
|
|||||||
LEAGUE_DISSMISS: 'onLeagueDismiss', // 当联军解散
|
LEAGUE_DISSMISS: 'onLeagueDismiss', // 当联军解散
|
||||||
LEAGUE_ABDICATE: 'onLeagueAbdicate', // 当被转让盟主
|
LEAGUE_ABDICATE: 'onLeagueAbdicate', // 当被转让盟主
|
||||||
LEAGUE_ITEM_UPDATE: 'onLeagueItemUpdate',
|
LEAGUE_ITEM_UPDATE: 'onLeagueItemUpdate',
|
||||||
|
GVG_TASK_UPDATE: 'onGVGTaskUpdate', // GVG任务更新
|
||||||
}
|
}
|
||||||
@@ -574,6 +574,7 @@ export const FILENAME = {
|
|||||||
DIC_GVG_CONTRIBUTE_BOX: 'dic_zyz_GVGContributeBox',
|
DIC_GVG_CONTRIBUTE_BOX: 'dic_zyz_GVGContributeBox',
|
||||||
DIC_GVG_AREA: 'dic_zyz_GVGArea',
|
DIC_GVG_AREA: 'dic_zyz_GVGArea',
|
||||||
DIC_GVG_CITY_ADD: 'dic_zyz_GVGCityAdd',
|
DIC_GVG_CITY_ADD: 'dic_zyz_GVGCityAdd',
|
||||||
|
DIC_GVG_TASK: 'dic_zyz_GVGTask',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const WAR_RELATE_TABLES = [
|
export const WAR_RELATE_TABLES = [
|
||||||
@@ -799,7 +800,10 @@ export enum TASK_TYPE {
|
|||||||
ARTIFACT_QUALITY_EQUIP = 128, // 穿戴X件品质为X的宝物
|
ARTIFACT_QUALITY_EQUIP = 128, // 穿戴X件品质为X的宝物
|
||||||
ARTIFACT_COMPOSE = 129, // 合成X次宝物
|
ARTIFACT_COMPOSE = 129, // 合成X次宝物
|
||||||
STAR_UP_SUM = 130, // 总计升星次数
|
STAR_UP_SUM = 130, // 总计升星次数
|
||||||
BATTLE_BRANCH_ELITE = 131, // 通关
|
BATTLE_BRANCH_ELITE = 131, // 通关梦魇支线关卡
|
||||||
|
GVG_FARM = 132, // 农庄种植/矿山采集/木堆砍柴
|
||||||
|
GVG_VESTIGE = 133, // 中原遗迹挑战
|
||||||
|
GVG_TECH = 134, // 千机阁捐献
|
||||||
}
|
}
|
||||||
|
|
||||||
// 任务累积类型
|
// 任务累积类型
|
||||||
@@ -1083,6 +1087,7 @@ export enum ITEM_CHANGE_REASON {
|
|||||||
MINE_END = 167, // 挖矿
|
MINE_END = 167, // 挖矿
|
||||||
GVG_RECEIVE_BOX = 167, // 领取宝箱
|
GVG_RECEIVE_BOX = 167, // 领取宝箱
|
||||||
GVG_RECEIVE_LV = 168, // 领取等级奖励
|
GVG_RECEIVE_LV = 168, // 领取等级奖励
|
||||||
|
GVG_RECEIVE_TASK = 169, // 领取任务奖励
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum TA_EVENT {
|
export enum TA_EVENT {
|
||||||
|
|||||||
@@ -332,6 +332,8 @@ export const STATUS = {
|
|||||||
GVG_LV_NOT_ENOUGH: { code: 21326, simStr: '联军等级不足' },
|
GVG_LV_NOT_ENOUGH: { code: 21326, simStr: '联军等级不足' },
|
||||||
GVG_LV_REWARD_HAS_RECEIVED: { code: 21327, simStr: '该等级奖励已领取过' },
|
GVG_LV_REWARD_HAS_RECEIVED: { code: 21327, simStr: '该等级奖励已领取过' },
|
||||||
GVG_LV_REWARD_NOT_REACH: { code: 21328, simStr: '请先领取上一级奖励再领取这一等级' },
|
GVG_LV_REWARD_NOT_REACH: { code: 21328, simStr: '请先领取上一级奖励再领取这一等级' },
|
||||||
|
GVG_TASK_NOT_ENOUGH: { code: 21329, simStr: '任务未达成' },
|
||||||
|
GVG_TASK_HAS_RECEIVED: { code: 21330, simStr: '任务已领取过' },
|
||||||
|
|
||||||
// 通用 30000 - 30099
|
// 通用 30000 - 30099
|
||||||
DIC_DATA_NOT_FOUND: { code: 30000, simStr: '数据表未找到' },
|
DIC_DATA_NOT_FOUND: { code: 30000, simStr: '数据表未找到' },
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export default class GVGUserItem extends BaseModel {
|
|||||||
expireTime: number;
|
expireTime: number;
|
||||||
|
|
||||||
public static async findByRole(configId: number, leagueCode: string, roleId: string) {
|
public static async findByRole(configId: number, leagueCode: string, roleId: string) {
|
||||||
const result: GVGUserItemType[] = await GVGUserItemModel.find({ configId, leagueCode, roleId, expireTime: { $gte: nowSeconds() } }, { _id: 0 }).lean();
|
const result: GVGUserItemType[] = await GVGUserItemModel.find({ configId, leagueCode, roleId, expireTime: { $gte: nowSeconds() } }, { _id: 0, id: 1, count: 1 }).lean();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import BaseModel from './BaseModel';
|
import BaseModel from './BaseModel';
|
||||||
import { index, getModelForClass, prop, DocumentType, } from '@typegoose/typegoose';
|
import { index, getModelForClass, prop, DocumentType, } from '@typegoose/typegoose';
|
||||||
import { getZeroPointD } from '../pubUtils/timeUtil';
|
import { getZeroPointD } from '../pubUtils/timeUtil';
|
||||||
|
import { TASK_FUN_TYPE } from '../consts';
|
||||||
|
import { UpdateTaskParam } from '../domain/roleField/task';
|
||||||
|
|
||||||
@index({ leagueCode: 1, roleId: 1, configId: 1, status: 1 })
|
@index({ leagueCode: 1, roleId: 1, configId: 1, status: 1 })
|
||||||
export default class GVGUserTask extends BaseModel {
|
export default class GVGUserTask extends BaseModel {
|
||||||
@@ -17,20 +19,52 @@ export default class GVGUserTask extends BaseModel {
|
|||||||
@prop({ required: true, default: 0 })
|
@prop({ required: true, default: 0 })
|
||||||
id: number; // 任务id
|
id: number; // 任务id
|
||||||
|
|
||||||
|
@prop({ required: true, enum: TASK_FUN_TYPE })
|
||||||
|
type: number; // 任务类型
|
||||||
|
|
||||||
@prop({ required: true, default: 0 })
|
@prop({ required: true, default: 0 })
|
||||||
count: number; // 1-已达成
|
count: number; // 1-已达成
|
||||||
|
|
||||||
@prop({ required: true, default: 0 })
|
@prop({ required: true, default: 0 })
|
||||||
status: number; // 1-未领取 2-已领取
|
status: number; // 1-未领取 2-已领取
|
||||||
|
|
||||||
@prop({ required: true, default: 0 })
|
|
||||||
createTime: number; // 1-未领取 2-已领取
|
|
||||||
|
|
||||||
public static async findByRole(configId: number, leagueCode: string, roleId: string) {
|
public static async findByRole(configId: number, leagueCode: string, roleId: string) {
|
||||||
let today = getZeroPointD();
|
let today = getZeroPointD();
|
||||||
const result: GVGUserTaskType[] = await GVGUserTaskModel.find({ configId, leagueCode, roleId, createdAt: { $gte: today } }, { _id: 0, id: 1, count: 1, status: 1 }).lean();
|
const result: GVGUserTaskType[] = await GVGUserTaskModel.find({ configId, leagueCode, roleId, createdAt: { $gte: today } }, { _id: 0, id: 1, count: 1, status: 1 }).lean();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async setTaskRec(configId: number, leagueCode: string, roleId: string, taskType: number, taskId: number, count: number) {
|
||||||
|
let today = getZeroPointD();
|
||||||
|
let rec: GVGUserTaskType = await GVGUserTaskModel.findOneAndUpdate({ configId, leagueCode, roleId, id: taskId, createdAt: { $gte: today } }, { $setOnInsert: { taskType, status: 1 }, $set: { count } }, { new: true, upsert: true }).lean();
|
||||||
|
return rec;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async incTaskRec(configId: number, leagueCode: string, roleId: string, taskType: number, taskId: number, count: number) {
|
||||||
|
let today = getZeroPointD();
|
||||||
|
let rec: GVGUserTaskType = await GVGUserTaskModel.findOneAndUpdate({ configId, leagueCode, roleId, id: taskId, createdAt: { $gte: today } }, { $setOnInsert: { taskType, status: 1 }, $inc: { count } }, { new: true, upsert: true }).lean();
|
||||||
|
return rec;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async setOrIncTask(configId: number, leagueCode: string, roleId: string, taskType: number, taskId: number, param: UpdateTaskParam) {
|
||||||
|
if(param.set) {
|
||||||
|
return await this.setTaskRec(configId, leagueCode, roleId, taskType, taskId, param.set);
|
||||||
|
} else if (param.inc) {
|
||||||
|
return await this.incTaskRec(configId, leagueCode, roleId, taskType, taskId, param.inc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async findByTaskId(configId: number, leagueCode: string, roleId: string, taskId: number) {
|
||||||
|
let today = getZeroPointD();
|
||||||
|
let rec: GVGUserTaskType = await GVGUserTaskModel.findOne({ configId, leagueCode, roleId, id: taskId, createdAt: { $gte: today } }).lean();
|
||||||
|
return rec;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async receiveTask(configId: number, leagueCode: string, roleId: string, taskId: number) {
|
||||||
|
let today = getZeroPointD();
|
||||||
|
let rec: GVGUserTaskType = await GVGUserTaskModel.findOneAndUpdate({ configId, leagueCode, roleId, id: taskId, createdAt: { $gte: today } }, { $set: { status: 2 } }, { new: true }).lean();
|
||||||
|
return rec;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const GVGUserTaskModel = getModelForClass(GVGUserTask);
|
export const GVGUserTaskModel = getModelForClass(GVGUserTask);
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ import { dicGVGResourceBase, dicGVGResourceBaseByType, dicGVGResourceBaseByLv, l
|
|||||||
import { dicGVGContributeBox, loadGVGContributeBox } from './dictionary/DicGVGContributeBox';
|
import { dicGVGContributeBox, loadGVGContributeBox } from './dictionary/DicGVGContributeBox';
|
||||||
import { dicGVGArea, dicGVGCity, loadGVGArea } from './dictionary/DicGVGArea';
|
import { dicGVGArea, dicGVGCity, loadGVGArea } from './dictionary/DicGVGArea';
|
||||||
import { dicGVGCityAdd, loadGVGCityAdd } from './dictionary/DicGVGCityAdd';
|
import { dicGVGCityAdd, loadGVGCityAdd } from './dictionary/DicGVGCityAdd';
|
||||||
|
import { dicGVGTask, dicGVGTaskByType, loadGVGTask } from './dictionary/DicGVGTask';
|
||||||
|
|
||||||
export const gameData = {
|
export const gameData = {
|
||||||
daily: dicDaily,
|
daily: dicDaily,
|
||||||
@@ -317,6 +318,8 @@ export const gameData = {
|
|||||||
gvgArea: dicGVGArea,
|
gvgArea: dicGVGArea,
|
||||||
gvgCity: dicGVGCity,
|
gvgCity: dicGVGCity,
|
||||||
gvgCityAdd: dicGVGCityAdd,
|
gvgCityAdd: dicGVGCityAdd,
|
||||||
|
gvgTask: dicGVGTask,
|
||||||
|
gvgTaskByType: dicGVGTaskByType,
|
||||||
};
|
};
|
||||||
|
|
||||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||||
@@ -1146,6 +1149,15 @@ function parseGVGSpFieldRatio() {
|
|||||||
gameData.gvgSpFieldRatio.max = parseFloat(arr[0]);
|
gameData.gvgSpFieldRatio.max = parseFloat(arr[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getGVGTasksByType(taskType: number) {
|
||||||
|
let taskIds = gameData.gvgTaskByType.get(taskType)||[];
|
||||||
|
return taskIds.map(taskId => {
|
||||||
|
let dic = gameData.gvgTask.get(taskId);
|
||||||
|
console.log(taskId, dic)
|
||||||
|
return dic
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 初始加载
|
// 初始加载
|
||||||
function initDatas() {
|
function initDatas() {
|
||||||
parseDicParam();
|
parseDicParam();
|
||||||
@@ -1352,6 +1364,7 @@ function loadDatas() {
|
|||||||
loadGVGContributeBox();
|
loadGVGContributeBox();
|
||||||
loadGVGArea();
|
loadGVGArea();
|
||||||
loadGVGCityAdd();
|
loadGVGCityAdd();
|
||||||
|
loadGVGTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重载dicParam
|
// 重载dicParam
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
// GVG任务
|
||||||
|
import { FILENAME } from '../../consts'
|
||||||
|
import { RewardInter } from '../interface';
|
||||||
|
import { parseGoodStr, parseNumberList, readFileAndParse } from '../util'
|
||||||
|
|
||||||
|
export interface DicGVGTask {
|
||||||
|
// 唯一id
|
||||||
|
id: number;
|
||||||
|
// 任务id
|
||||||
|
taskId: number;
|
||||||
|
// 任务类型
|
||||||
|
taskType: number;
|
||||||
|
// 任务参数
|
||||||
|
taskParam: number[];
|
||||||
|
// 条件
|
||||||
|
condition: number;
|
||||||
|
// 普通背包奖励
|
||||||
|
reward: RewardInter[];
|
||||||
|
// 联军背包奖励
|
||||||
|
leagueReward: RewardInter[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export const dicGVGTask = new Map<number, DicGVGTask>();
|
||||||
|
export const dicGVGTaskByType = new Map<number, number[]>(); // type => []
|
||||||
|
export function loadGVGTask() {
|
||||||
|
dicGVGTask.clear();
|
||||||
|
|
||||||
|
let arr = readFileAndParse(FILENAME.DIC_GVG_TASK);
|
||||||
|
arr.forEach(o => {
|
||||||
|
o.taskParam = parseNumberList(o.taskParam);
|
||||||
|
o.reward = parseGoodStr(o.reward);
|
||||||
|
o.leagueReward = parseGoodStr(o.leagueReward);
|
||||||
|
dicGVGTask.set(o.taskId, o);
|
||||||
|
if(!dicGVGTaskByType.has(o.taskType)) {
|
||||||
|
dicGVGTaskByType.set(o.taskType, []);
|
||||||
|
}
|
||||||
|
dicGVGTaskByType.get(o.taskType)?.push(o.taskId);
|
||||||
|
});
|
||||||
|
arr = undefined;
|
||||||
|
}
|
||||||
@@ -1,20 +1,23 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
"id": 1,
|
||||||
"cityType": 1,
|
"cityType": 1,
|
||||||
"foodAdd": 0.1,
|
"foodAdd": 10,
|
||||||
"mineralAdd": 0.1,
|
"mineralAdd": 10,
|
||||||
"woodAdd": 0.1
|
"woodAdd": 10
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": 2,
|
||||||
"cityType": 2,
|
"cityType": 2,
|
||||||
"foodAdd": 0.3,
|
"foodAdd": 30,
|
||||||
"mineralAdd": 0.3,
|
"mineralAdd": 30,
|
||||||
"woodAdd": 0.3
|
"woodAdd": 30
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": 3,
|
||||||
"cityType": 3,
|
"cityType": 3,
|
||||||
"foodAdd": 0.5,
|
"foodAdd": 50,
|
||||||
"mineralAdd": 0.5,
|
"mineralAdd": 50,
|
||||||
"woodAdd": 0.5
|
"woodAdd": 50
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"type": 1,
|
||||||
|
"template": "%d贡献了%d%d",
|
||||||
|
"comments": "%d:玩家名 %d:粮食/木材/铁矿 %d:产量数值"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"type": 1,
|
||||||
|
"template": "%d成功占领%d%d驻扎点",
|
||||||
|
"comments": "%d:玩家名 %d:遗迹名 %d:第X名"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"type": 1,
|
||||||
|
"template": "%d占领%d%d驻扎点被%d成员抢占",
|
||||||
|
"comments": "%d:玩家名 %d:遗迹名 %d:第X名 %d联军名"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"type": 1,
|
||||||
|
"template": "%d激活成功,%d获得%d",
|
||||||
|
"comments": "%d:神机点名字 %d:本次获得该道具的玩家名,以顿号隔开 %d:道具名"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"type": 1,
|
||||||
|
"template": "今日的遗迹已关闭,在大家的不懈努力下联军获得%d名",
|
||||||
|
"comments": "%d:联军驻扎分排名"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"type": 1,
|
||||||
|
"template": "%d军团已退出本联军",
|
||||||
|
"comments": "%d:军团名"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 7,
|
||||||
|
"type": 1,
|
||||||
|
"template": "%d军团加入本联军",
|
||||||
|
"comments": "%d:军团名"
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"taskId": 1,
|
||||||
|
"taskType": 132,
|
||||||
|
"taskInfo": "农庄种植/矿山采集/木堆砍柴完成1次",
|
||||||
|
"taskParam": "1&",
|
||||||
|
"condition": 1,
|
||||||
|
"reward": "31002&500",
|
||||||
|
"leagueReward": "13&1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"taskId": 2,
|
||||||
|
"taskType": 133,
|
||||||
|
"taskInfo": "中原遗迹挑战1次",
|
||||||
|
"taskParam": "1&",
|
||||||
|
"condition": 1,
|
||||||
|
"reward": "31002&500",
|
||||||
|
"leagueReward": "13&1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"taskId": 3,
|
||||||
|
"taskType": 134,
|
||||||
|
"taskInfo": "千机阁捐献1次",
|
||||||
|
"taskParam": "1&",
|
||||||
|
"condition": 1,
|
||||||
|
"reward": "31002&500",
|
||||||
|
"leagueReward": "13&1"
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -72,10 +72,10 @@
|
|||||||
{
|
{
|
||||||
"id": 8,
|
"id": 8,
|
||||||
"name": "武将",
|
"name": "武将",
|
||||||
"info": "x名x初始品质升至x星",
|
"info": "x名x品质升至x星",
|
||||||
"param": "herocount&quality&star&",
|
"param": "herocount&quality&star&",
|
||||||
"string": "武将数量&品质&星级&",
|
"string": "武将数量&品质&星级&",
|
||||||
"content": "升星可算彩星,但需加上普通升星的星数,比如彩6星填12=6+6;品质是使用等号判断的,紫色的升星不能达成蓝色的条件",
|
"content": "升至x星是只算普通升星的;品质是使用等号判断的,紫色的升星不能达成蓝色的条件",
|
||||||
"condition": "herocount",
|
"condition": "herocount",
|
||||||
"sumType": 1
|
"sumType": 1
|
||||||
},
|
},
|
||||||
@@ -325,7 +325,7 @@
|
|||||||
"info": "通关秘境x次",
|
"info": "通关秘境x次",
|
||||||
"param": "count&",
|
"param": "count&",
|
||||||
"string": "秘境挑战次数&",
|
"string": "秘境挑战次数&",
|
||||||
"content": "只计算warType为6的关卡;必须挑战胜利才计算;扫荡也算",
|
"content": "只计算warType为6或13的关卡;必须挑战胜利才计算;扫荡也算",
|
||||||
"condition": "count",
|
"condition": "count",
|
||||||
"sumType": 2
|
"sumType": 2
|
||||||
},
|
},
|
||||||
@@ -335,7 +335,7 @@
|
|||||||
"info": "秘境通关x关x难度",
|
"info": "秘境通关x关x难度",
|
||||||
"param": "warcount&warid&…",
|
"param": "warcount&warid&…",
|
||||||
"string": "填几个warid&关卡id&…",
|
"string": "填几个warid&关卡id&…",
|
||||||
"content": "只计算warType为6的关卡;必须挑战胜利才计算;扫荡也算",
|
"content": "只计算warType为6或13的关卡;必须挑战胜利才计算;扫荡也算",
|
||||||
"condition": "warcount",
|
"condition": "warcount",
|
||||||
"sumType": 1
|
"sumType": 1
|
||||||
},
|
},
|
||||||
@@ -362,7 +362,7 @@
|
|||||||
{
|
{
|
||||||
"id": 48,
|
"id": 48,
|
||||||
"name": "关卡",
|
"name": "关卡",
|
||||||
"info": "通关支线x关",
|
"info": "通关遗迹x关",
|
||||||
"param": "warcount&warid",
|
"param": "warcount&warid",
|
||||||
"string": "挑战次数&",
|
"string": "挑战次数&",
|
||||||
"content": "只计算warType为2的关卡;必须挑战胜利才计算;扫荡也算",
|
"content": "只计算warType为2的关卡;必须挑战胜利才计算;扫荡也算",
|
||||||
@@ -571,11 +571,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 73,
|
"id": 73,
|
||||||
"name": "梦魇关卡",
|
"name": "精英任务",
|
||||||
"info": "梦魇通关第x关",
|
"info": "精英通关第x关",
|
||||||
"param": "warcount&warid&…",
|
"param": "warcount&warid&",
|
||||||
"string": "关卡id",
|
"string": "关卡id",
|
||||||
"content": "只计算warType为12的关卡;必须挑战胜利才计算;计算扫荡;主线基金是算这个type的",
|
"content": 0,
|
||||||
"condition": "warcount",
|
"condition": "warcount",
|
||||||
"sumType": 1
|
"sumType": 1
|
||||||
},
|
},
|
||||||
@@ -605,7 +605,7 @@
|
|||||||
"info": "x名武将觉醒后升至x星",
|
"info": "x名武将觉醒后升至x星",
|
||||||
"param": "herocount&star&",
|
"param": "herocount&star&",
|
||||||
"string": "武将数量&星级",
|
"string": "武将数量&星级",
|
||||||
"content": "只算彩星,填1,不用计算黄星的6",
|
"content": 0,
|
||||||
"condition": "herocount",
|
"condition": "herocount",
|
||||||
"sumType": 1
|
"sumType": 1
|
||||||
},
|
},
|
||||||
@@ -1106,7 +1106,37 @@
|
|||||||
"param": "warcount&warid",
|
"param": "warcount&warid",
|
||||||
"string": "挑战次数&",
|
"string": "挑战次数&",
|
||||||
"content": "只计算warType为13的关卡;必须挑战胜利才计算;扫荡也算",
|
"content": "只计算warType为13的关卡;必须挑战胜利才计算;扫荡也算",
|
||||||
"condition": "count",
|
"condition": "warcount",
|
||||||
"sumType": 1
|
"sumType": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 132,
|
||||||
|
"name": "GVG",
|
||||||
|
"info": "农庄种植/矿山采集/木堆砍柴完成X次",
|
||||||
|
"param": "count&",
|
||||||
|
"string": "次数&",
|
||||||
|
"content": "三种活动完成任意一种即达成1次",
|
||||||
|
"condition": "count",
|
||||||
|
"sumType": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 133,
|
||||||
|
"name": "GVG",
|
||||||
|
"info": "中原遗迹挑战X次",
|
||||||
|
"param": "count&",
|
||||||
|
"string": "次数&",
|
||||||
|
"content": 0,
|
||||||
|
"condition": "count",
|
||||||
|
"sumType": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 134,
|
||||||
|
"name": "GVG",
|
||||||
|
"info": "千机阁捐献X",
|
||||||
|
"param": "count&",
|
||||||
|
"string": "次数&",
|
||||||
|
"content": 0,
|
||||||
|
"condition": "count",
|
||||||
|
"sumType": 2
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -33,6 +33,6 @@
|
|||||||
"DEBUG_TIME": 1,
|
"DEBUG_TIME": 1,
|
||||||
"CHECK_WORD": 1,
|
"CHECK_WORD": 1,
|
||||||
"CAN_PAY": 1,
|
"CAN_PAY": 1,
|
||||||
"SKIP_ENCODE": 0,
|
"SKIP_ENCODE": 1,
|
||||||
"NEED_REBATE": 0
|
"NEED_REBATE": 0
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user