领取宝箱
This commit is contained in:
@@ -390,7 +390,7 @@ export class PvpHandler {
|
||||
if (hisScore < pvpBox.score) {
|
||||
return resResult(STATUS.PVP_NOT_REACH_BOX_SCORE);
|
||||
}
|
||||
if (_.indexOf(receivedBox, id) != -1 ) {
|
||||
if (receivedBox.indexOf(id) != -1 ) {
|
||||
return resResult(STATUS.PVP_BOX_IS_GOT);
|
||||
}
|
||||
receivedBox.push(id);
|
||||
|
||||
@@ -8,14 +8,14 @@ import { startEvent } from "./eventSercive";
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user