字典:解析export

This commit is contained in:
luying
2021-05-29 17:57:38 +08:00
parent b075dcfcd4
commit 6f61993f55
10 changed files with 17 additions and 16 deletions

View File

@@ -148,7 +148,7 @@ export class PvpHandler {
// 刷新次数及消耗
let { refOppCnt, refOppTime, consume } = getRefOppCnt(pvpDefense.refOppCnt, pvpDefense.refOppTime);
if (refOppCnt >= gameData.maxPvpRefreshCnt) {
if (refOppCnt >= gameData.maxPvpRefreshCnt.max) {
return resResult(STATUS.PVP_REFRESH_CNT_REACH_MAX);
}

View File

@@ -512,7 +512,8 @@ export class HeroHandler {
let { favourLv: oldLv, favour: oldExp } = hero;
let maxLv = gameData.maxFriendShipLv; // 好感度最大等级
let maxLv = gameData.maxFriendShipLv.max; // 好感度最大等级
console.log(maxLv)
if (maxLv <= oldLv)
return resResult(STATUS.HERO_FAVOUR_LEVEL_REACH_MAXT);

View File

@@ -344,7 +344,7 @@ export class RoleHandler {
update.scrollColorStar = 0;
// 获取一定好感度
let maxLv = gameData.maxFriendShipLv;
let maxLv = gameData.maxFriendShipLv.max;
if (maxLv > favourLv) {
update.favour += SCROLL.SCROLL_ACTIVE_FAVOUR;

View File

@@ -14,7 +14,7 @@ export async function roleLevelup(roleId: string, kingExp: number, session: Back
const serverId = session.get('serverId');
let role = await RoleModel.findByRoleId(roleId);
let { lv = 1, exp = 0 } = role;
let canGetExp = lv < gameData.maxPlayerLv; // 当主公超过最大级后,挑战结算不再获得经验值
let canGetExp = lv < gameData.maxPlayerLv.max; // 当主公超过最大级后,挑战结算不再获得经验值
let newExp = canGetExp ? exp + kingExp : exp;
let newLv = getLvByExp(newExp);
// 等级超过最高级之后,经验依然可以稍微溢出一些,以备下一次提升等级