任务:添加每日主公经验

This commit is contained in:
luying
2021-07-01 19:02:39 +08:00
parent 0903959d5d
commit c94e2a40e5
8 changed files with 70 additions and 31 deletions

View File

@@ -52,7 +52,7 @@ export interface DicDailyTask extends DicTaskBase {
// 活跃
readonly point: number;
// 经验基数
readonly exp: number;
readonly exp: RewardInter;
// 获得积分关联的活动id
readonly addPointActivityId: number;
}
@@ -112,6 +112,7 @@ export function loadTask() {
arrDailyTask.forEach(o => {
o.taskParam = parseNumberList(o.taskParam);
o.taskReward = parseGoodStr(o.taskReward);
o.exp = parseExp(o.exp);
dicDailyTask.set(o.id, _.pick(o, Object.keys(DicDailyTaskKeys)));
pushDicTaskType(o.taskType, TASK_FUN_TYPE.DAILY, o);
});
@@ -133,4 +134,9 @@ function pushDicTaskType(taskType: number, type: number, o: any) {
let newObj = _.pick(o, Object.keys(DicTaskKeys));
newObj.type = type;
dicTaskType.get(taskType).push(newObj)
}
function parseExp(exp: string) {
let [ id, count ] = parseNumberList(exp);
return {id, count}
}