形象:头像相框形象字段
This commit is contained in:
@@ -14,7 +14,7 @@ import { getRandEelm, getRandValue, resResult, ratioReward, getRandValueByMinMax
|
||||
import { getRandRobot, transBossHpArr } from "./battleService";
|
||||
import { difference, omit } from 'underscore';
|
||||
import { Channel, ChannelService } from 'pinus';
|
||||
import { TREASURE } from '../pubUtils/dicParam';
|
||||
import { TREASURE, FIGURE } from '../pubUtils/dicParam';
|
||||
import { decreaseItems } from './rewardService';
|
||||
import { getFriendLvAdd } from './friendService';
|
||||
import { getRoleIds } from '../pubUtils/friendUtil';
|
||||
@@ -56,9 +56,9 @@ export function getRandComBtlRobots(topLineupCe: number, ceLimit: number, lv: nu
|
||||
robotCe = getRandValue(topLineupCe || 0, COM_BTL_CONST.ROBOT_CE_RATIO, 0);
|
||||
}
|
||||
const robotLv = getRandValue(lv, COM_BTL_CONST.ROBOT_CE_RATIO, 0);
|
||||
const imgHid = robot[Math.floor(Math.random() * robot.length)];
|
||||
// const imgHid = robot[Math.floor(Math.random() * robot.length)];
|
||||
const { robotRoleId, robotRoleName } = robotInfos[idx];
|
||||
let robotStatus = new RoleStatus(robotRoleId, robotRoleName, false, false, imgHid, imgHid, robotCe, robotLv, robot, true);
|
||||
let robotStatus = new RoleStatus(robotRoleId, robotRoleName, false, false, FIGURE.DEFAULT_HEAD, FIGURE.DEFAULT_FRAME, FIGURE.DEFAULT_SPINE, robotCe, robotLv, robot, true);
|
||||
robotStArr.push(robotStatus);
|
||||
robotIdArr.push(robotRoleId);
|
||||
});
|
||||
@@ -490,12 +490,13 @@ async function teammateValid(roleInfo: Partial<RoleType>, roleId: string, roleId
|
||||
*/
|
||||
export async function getValidTeammateRoleSt(roleId: string, roleIds: string[], ceLimit: number, quality: number) {
|
||||
let roleInfo = await RoleModel.findByRoleId(roleId, null, true);
|
||||
let { roleName, headHid = 19, sHid = 19, topLineupCe, lv } = roleInfo;
|
||||
let { roleName, head = FIGURE.DEFAULT_HEAD, frame = FIGURE.DEFAULT_FRAME, spine = FIGURE.DEFAULT_SPINE, topLineupCe, lv } = roleInfo;
|
||||
|
||||
const valid = await teammateValid(roleInfo, roleId, roleIds, ceLimit);
|
||||
if (!valid) return null;
|
||||
|
||||
let isFrd = await getFrd(roleId, quality);
|
||||
const result = new RoleStatus(roleId, roleName, false, isFrd, headHid, sHid, topLineupCe, lv);
|
||||
const result = new RoleStatus(roleId, roleName, false, isFrd, head, frame, spine, topLineupCe, lv);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -573,9 +574,9 @@ export async function hasEnoughBlueprt(roleId: string, blueprtId: number) {
|
||||
* @param {boolean} isFrd
|
||||
*/
|
||||
export function addRoleToTeam(comTeam: MemComBtlTeam, roleInfo: RoleType, isCap: boolean, isFrd: boolean) {
|
||||
const { roleId, roleName, headHid = 19, sHid = 19, lv } = roleInfo;
|
||||
const { roleId, roleName, head = FIGURE.DEFAULT_HEAD, frame = FIGURE.DEFAULT_FRAME, spine = FIGURE.DEFAULT_SPINE, lv } = roleInfo;
|
||||
let { topLineupCe = 1000 } = roleInfo;
|
||||
const roleSt = new RoleStatus(roleId, roleName, isCap, isFrd, headHid, sHid, topLineupCe, lv);
|
||||
const roleSt = new RoleStatus(roleId, roleName, isCap, isFrd, head, frame, spine, topLineupCe, lv);
|
||||
addRoleStToTeam(comTeam, roleSt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user