优化:初始角色时,不初始pvpdefense
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user