关卡:主公经验和等级挂钩
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Application, BackendSession, pinus, HandlerService, } from "pinus";
|
||||
import { resResult, parseGoodStr, getRandSingleEelm } from "../../../pubUtils/util";
|
||||
import { STATUS, TASK_FUN_TYPE, SHOP_REFRESH_TYPE } from "../../../consts";
|
||||
import { STATUS, TASK_FUN_TYPE, SHOP_REFRESH_TYPE, KING_EXP_RATIO_TYPE } from "../../../consts";
|
||||
import { gameData } from "../../../pubUtils/data";
|
||||
import { UserTaskRecModel } from "../../../db/UserTaskRec";
|
||||
import { addItems } from "../../../services/rewardService";
|
||||
@@ -63,8 +63,7 @@ export class ShopHandler {
|
||||
}
|
||||
point = userTask.dailyTaskPoint;
|
||||
weeklyPoint = userTask.dailyTaskPointWeekly;
|
||||
let { lv } = await RoleModel.findByRoleId(roleId, 'lv');
|
||||
expItem = { id: dic.exp.id, count: dic.exp.count * gameData.taskExp.get(lv) };
|
||||
expItem = { id: dic.exp.id, count: dic.exp.count };
|
||||
} else if (type == TASK_FUN_TYPE.ACHIEVEMENT) {
|
||||
let dic = <DicAchievement>dicTask;
|
||||
let userTask = await UserTaskModel.incInfo(roleId, { achievementPoint: dic.point });
|
||||
@@ -81,7 +80,7 @@ export class ShopHandler {
|
||||
|
||||
let goods = await addItems(roleId, roleName, sid, taskReward);
|
||||
if (expItem && expItem.count > 0) {
|
||||
await roleLevelup(roleId, expItem.count, session);
|
||||
await roleLevelup(KING_EXP_RATIO_TYPE.TASK, roleId, expItem.count, session);
|
||||
goods.push(expItem);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user