军团相关战力使用get方法

This commit is contained in:
luying
2021-02-02 12:36:55 +08:00
parent 830836b809
commit a9e2b79c79
7 changed files with 53 additions and 39 deletions

View File

@@ -6,14 +6,14 @@ import { RoleModel } from '../db/Role';
export async function eventOnPlayerLvUp(roleId: string, lv: number, addFuncs: Array<number>, dataFuncs: Array<number>) {
// if (!dataFuncs.includes(FUNCS_ID.PVP)) {//开启pvp
if (!dataFuncs.includes(FUNCS_ID.PVP)) {//开启pvp
let res = getFuncsSwitch(FUNCS_ID.PVP);
if (!res || lv >= res.param) {
let role = await RoleModel.findByRoleId(roleId);
await checkPvp(role);
addFuncs.push(FUNCS_ID.PVP);
}
// }
}
if (!dataFuncs.includes(FUNCS_ID.EVENT)) {//开启奇遇
let res = getFuncsSwitch(FUNCS_ID.EVENT);