后台:修复字段
This commit is contained in:
@@ -8,7 +8,6 @@ import { shouldRefresh, resResult, cal, getRandEelmWithWeight, genCode, } from '
|
|||||||
import { STATUS } from '../consts/statusCode';
|
import { STATUS } from '../consts/statusCode';
|
||||||
import { HangUpSpdUpRecModel } from '../db/HangUpSpdUpRec';
|
import { HangUpSpdUpRecModel } from '../db/HangUpSpdUpRec';
|
||||||
import { TaskHero, TowerTaskRecModel, TowerTaskRecType } from '../db/TowerTaskRec';
|
import { TaskHero, TowerTaskRecModel, TowerTaskRecType } from '../db/TowerTaskRec';
|
||||||
import { cloneDeep } from 'lodash';
|
|
||||||
import { Rank } from './rankService';
|
import { Rank } from './rankService';
|
||||||
import { checkActivityTask, checkTask } from './taskService';
|
import { checkActivityTask, checkTask } from './taskService';
|
||||||
import { getRandExpedition, gameData } from '../pubUtils/data';
|
import { getRandExpedition, gameData } from '../pubUtils/data';
|
||||||
@@ -595,19 +594,6 @@ export function getRandRobot(cnt = 1, withAttr = false) {
|
|||||||
return robots;
|
return robots;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 拷贝敌军数组并添加当前血量字段
|
|
||||||
* @param source 原敌军数组,不包含当前血量字段
|
|
||||||
*/
|
|
||||||
export function transBossHpArr(source: Array<{ dataId: number, hp: number, actorId: number }>): Array<{ dataId: number, hp: number, curHp: number, actorId: number }> {
|
|
||||||
let desArr = [];
|
|
||||||
source.forEach(elem => {
|
|
||||||
let { hp } = elem;
|
|
||||||
desArr.push(Object.assign(elem, { curHp: hp }));
|
|
||||||
});
|
|
||||||
return cloneDeep(desArr);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得下一次刷新派遣的花费
|
* 获得下一次刷新派遣的花费
|
||||||
* @param times 玩家表上的次数
|
* @param times 玩家表上的次数
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { STATUS } from './../consts/statusCode';
|
|||||||
import { COM_TEAM_STATUS, FRIEND_DROP_TYPE, COM_BTL_CONST, FRIEND_DROP_MAX } from './../consts';
|
import { COM_TEAM_STATUS, FRIEND_DROP_TYPE, COM_BTL_CONST, FRIEND_DROP_MAX } from './../consts';
|
||||||
import { RoleStatus, ComBattleTeamModel, ComBattleTeamType } from './../db/ComBattleTeam';
|
import { RoleStatus, ComBattleTeamModel, ComBattleTeamType } from './../db/ComBattleTeam';
|
||||||
import { getRandEelm, getRandValue, resResult, ratioReward, getRandValueByMinMax, getRandEelmWithWeight, getRobotInfo } from "../pubUtils/util";
|
import { getRandEelm, getRandValue, resResult, ratioReward, getRandValueByMinMax, getRandEelmWithWeight, getRobotInfo } from "../pubUtils/util";
|
||||||
import { getRandRobot, transBossHpArr } from "./battleService";
|
import { getRandRobot } from "./battleService";
|
||||||
import { Channel, ChannelService, pinus } from 'pinus';
|
import { Channel, ChannelService, pinus } from 'pinus';
|
||||||
import { TREASURE, EXTERIOR } from '../pubUtils/dicParam';
|
import { TREASURE, EXTERIOR } from '../pubUtils/dicParam';
|
||||||
import { getFriendLvAdd } from './friendService';
|
import { getFriendLvAdd } from './friendService';
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import moment = require('moment');
|
import moment = require('moment');
|
||||||
import { pick } from 'underscore';
|
|
||||||
import { FIRST_GIFT_STATE } from '../../consts';
|
import { FIRST_GIFT_STATE } from '../../consts';
|
||||||
import { ActivityModelType } from '../../db/Activity';
|
import { ActivityModelType } from '../../db/Activity';
|
||||||
import { ActivityFirstGiftModelType } from '../../db/ActivityFirstGift';
|
import { ActivityFirstGiftModelType } from '../../db/ActivityFirstGift';
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import moment = require('moment');
|
|
||||||
import { random } from 'underscore';
|
|
||||||
import { ActivityModelType } from '../../db/Activity';
|
import { ActivityModelType } from '../../db/Activity';
|
||||||
import { ActivityRechargeMoneyModelType } from '../../db/ActivityRechargeMoney';
|
import { ActivityRechargeMoneyModelType } from '../../db/ActivityRechargeMoney';
|
||||||
import { getRandEelmWithWeight, getRandSingleEelm } from '../../pubUtils/util';
|
import { getRandEelmWithWeight, getRandSingleEelm } from '../../pubUtils/util';
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { pick } from 'underscore';
|
|
||||||
import { RANK_TYPE } from '../../consts';
|
import { RANK_TYPE } from '../../consts';
|
||||||
import { ActivityModelType } from '../../db/Activity';
|
import { ActivityModelType } from '../../db/Activity';
|
||||||
import { ActivityTurntableModelType, TurntableRecord } from '../../db/ActivityTurntableRec';
|
|
||||||
import { RewardInter } from '../../pubUtils/interface';
|
|
||||||
import { getRandEelmWithWeight, parseGoodStr } from '../../pubUtils/util';
|
|
||||||
import { ActivityBase } from './activityField';
|
import { ActivityBase } from './activityField';
|
||||||
|
|
||||||
interface TimeLimitRewardInDb {
|
interface TimeLimitRewardInDb {
|
||||||
|
|||||||
@@ -1,7 +1,22 @@
|
|||||||
import { COM_TEAM_STATUS } from '../../consts';
|
import { COM_TEAM_STATUS } from '../../consts';
|
||||||
import { getBossHpByBlueprtId, getDicBlueprtById } from '../../pubUtils/data';
|
import { getBossHpByBlueprtId, getDicBlueprtById } from '../../pubUtils/data';
|
||||||
import { transBossHpArr } from '../../services/battleService';
|
|
||||||
import ComBattleTeam from './../../db/ComBattleTeam';
|
import ComBattleTeam from './../../db/ComBattleTeam';
|
||||||
|
import { cloneDeep } from 'lodash'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拷贝敌军数组并添加当前血量字段
|
||||||
|
* @param source 原敌军数组,不包含当前血量字段
|
||||||
|
*/
|
||||||
|
export function transBossHpArr(source: Array<{ dataId: number, hp: number, actorId: number }>): Array<{ dataId: number, hp: number, curHp: number, actorId: number }> {
|
||||||
|
let desArr = [];
|
||||||
|
source.forEach(elem => {
|
||||||
|
let { hp } = elem;
|
||||||
|
desArr.push(Object.assign(elem, { curHp: hp }));
|
||||||
|
});
|
||||||
|
return cloneDeep(desArr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export class MemComBtlTeam extends ComBattleTeam {
|
export class MemComBtlTeam extends ComBattleTeam {
|
||||||
bossCurHp: number;
|
bossCurHp: number;
|
||||||
curRnd: number;
|
curRnd: number;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { SimpleGuildRankParam, SimpleRoleRankParam } from '../rank'
|
|||||||
import { prop } from "@typegoose/typegoose";
|
import { prop } from "@typegoose/typegoose";
|
||||||
import { CITY_STATUS, RACE_ACTIVITY_STATUS, RACE_EVENT } from "../../consts";
|
import { CITY_STATUS, RACE_ACTIVITY_STATUS, RACE_EVENT } from "../../consts";
|
||||||
import { gameData, getRaceEventItems } from "../../pubUtils/data";
|
import { gameData, getRaceEventItems } from "../../pubUtils/data";
|
||||||
import { getRandEelm, getRandResultByMember, getRandValueByMinMax, sortArrRandom } from "../../pubUtils/util";
|
import { getRandEelm, getRandResultByMember, } from "../../pubUtils/util";
|
||||||
import { RewardInter } from "../../pubUtils/interface";
|
import { RewardInter } from "../../pubUtils/interface";
|
||||||
|
|
||||||
export class GateMembersRec {
|
export class GateMembersRec {
|
||||||
|
|||||||
@@ -238,5 +238,11 @@
|
|||||||
"activityType": 40,
|
"activityType": 40,
|
||||||
"name": "LUCKY_TURNTABLE",
|
"name": "LUCKY_TURNTABLE",
|
||||||
"string": "幸运转盘"
|
"string": "幸运转盘"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 41,
|
||||||
|
"activityType": 41,
|
||||||
|
"name": "TIME_LIMIT_RANK",
|
||||||
|
"string": "限时排行榜"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Reference in New Issue
Block a user