初始:修复初始pvp对手战力为0

This commit is contained in:
luying
2021-05-13 20:03:47 +08:00
parent 659bc5b8ea
commit aab35d167b
5 changed files with 108 additions and 156 deletions
+6 -4
View File
@@ -50,11 +50,13 @@ export async function initPvpInfo(role: RoleType) {
}
export async function checkPvp(role: RoleType) {
let result = await PvpDefenseModel.findByRoleId(role.roleId, true);
if (!!result)
if(role.hasInit) {
let result = await PvpDefenseModel.findByRoleId(role.roleId, true);
if (!!result)
return result;
result = await initPvpInfo(role);
return result;
result = await initPvpInfo(role);
return result;
}
}
/**