寻宝:去掉业务逻辑中 reduceCe 的处理
This commit is contained in:
@@ -10,7 +10,7 @@ import { STATUS } from './../consts/statusCode';
|
||||
import { COM_TEAM_STATUS, CURRENCY_BY_TYPE, CURRENCY_TYPE, FRIEND_DROP_TYPE, COM_BTL_CONST, FRIEND_DROP_MAX } from './../consts';
|
||||
import { RoleStatus, ComBattleTeamModel, ComBattleTeamType } from './../db/ComBattleTeam';
|
||||
import { getBluePrtByQuality, getComBtlSetByQuality, getRewardByBlueprtId, getWarById, getWarIdByBlueprtId, comBtlRangeInfo, getGoodById, comBtlRangeByLv, getBossHpByBlueprtId } from "../pubUtils/gamedata";
|
||||
import { getRandEelm, getRandValue, resResult, ratioReward, getRandValueByMinMax, getRandomWithWeight, decodeStr, getRobotInfo, reduceCe } from "../pubUtils/util";
|
||||
import { getRandEelm, getRandValue, resResult, ratioReward, getRandValueByMinMax, getRandomWithWeight, decodeStr, getRobotInfo } from "../pubUtils/util";
|
||||
import { getRandRobot, transBossHpArr } from "./battleService";
|
||||
import { difference, omit } from 'underscore';
|
||||
import { Channel, ChannelService } from 'pinus';
|
||||
@@ -474,7 +474,6 @@ async function teammateValid(roleInfo: Partial<RoleType>, roleId: string, roleId
|
||||
if(isBlack) return false;
|
||||
|
||||
let { topFiveCe } = roleInfo;
|
||||
topFiveCe = reduceCe(topFiveCe);
|
||||
if (topFiveCe < ceLimit) return false;
|
||||
|
||||
return true;
|
||||
@@ -576,7 +575,6 @@ export async function hasEnoughBlueprt(roleId: string, blueprtId: number) {
|
||||
export function addRoleToTeam(comTeam: MemComBtlTeam, roleInfo: RoleType, isCap: boolean, isFrd: boolean) {
|
||||
const { roleId, roleName, headHid = 19, sHid = 19, lv } = roleInfo;
|
||||
let { topFiveCe = 1000 } = roleInfo;
|
||||
topFiveCe = reduceCe(topFiveCe);
|
||||
const roleSt = new RoleStatus(roleId, roleName, isCap, isFrd, headHid, sHid, topFiveCe, lv);
|
||||
addRoleStToTeam(comTeam, roleSt);
|
||||
}
|
||||
@@ -673,7 +671,6 @@ export async function addRobotsLater(comTeam: MemComBtlTeam, roleInfo: RoleType,
|
||||
const { teamCode } = teamStatus;
|
||||
const { roleId, lv } = roleInfo;
|
||||
let { topFiveCe = 1000 } = roleInfo;
|
||||
topFiveCe = reduceCe(topFiveCe);
|
||||
|
||||
if (validToJoin(teamStatus)) {
|
||||
const robotCnt = 3 - teamStatus.roleIds.length;
|
||||
|
||||
Reference in New Issue
Block a user