优化:初始角色时,不初始pvpdefense

This commit is contained in:
luying
2021-09-06 20:09:56 +08:00
parent 62fb04a2ee
commit d1e97590fb
5 changed files with 21 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
import { checkPvp, findPvpDefByRoleId } from '../services/pvpService'
import { findPvpDefByRoleId } from '../services/pvpService'
import { getFuncsSwitch, gameData } from '../pubUtils/data';
import { FUNCS_ID, FUNC_OPT_TYPE } from '../consts/constModules/sysConst';
import { RoleModel } from '../db/Role';
@@ -19,10 +19,6 @@ export async function eventOnPlayerLvUp(roleId: string, lv: number, addFuncs: Ar
if (dicFunSwitch && lv >= dicFunSwitch.param) {
addFuncs.push(id);
if(id == FUNCS_ID.PVP) {
let role = await RoleModel.findByRoleId(roleId, null, true);
await checkPvp(role);
}
}
}