后台:修复字段

This commit is contained in:
luying
2022-03-04 10:19:54 +08:00
parent 8649cb82b7
commit c4a5534b19
8 changed files with 24 additions and 24 deletions

View File

@@ -1,5 +1,4 @@
import moment = require('moment');
import { pick } from 'underscore';
import { FIRST_GIFT_STATE } from '../../consts';
import { ActivityModelType } from '../../db/Activity';
import { ActivityFirstGiftModelType } from '../../db/ActivityFirstGift';

View File

@@ -1,5 +1,3 @@
import moment = require('moment');
import { random } from 'underscore';
import { ActivityModelType } from '../../db/Activity';
import { ActivityRechargeMoneyModelType } from '../../db/ActivityRechargeMoney';
import { getRandEelmWithWeight, getRandSingleEelm } from '../../pubUtils/util';

View File

@@ -1,9 +1,5 @@
import { pick } from 'underscore';
import { RANK_TYPE } from '../../consts';
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';
interface TimeLimitRewardInDb {

View File

@@ -1,7 +1,22 @@
import { COM_TEAM_STATUS } from '../../consts';
import { getBossHpByBlueprtId, getDicBlueprtById } from '../../pubUtils/data';
import { transBossHpArr } from '../../services/battleService';
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 {
bossCurHp: number;
curRnd: number;

View File

@@ -3,7 +3,7 @@ import { SimpleGuildRankParam, SimpleRoleRankParam } from '../rank'
import { prop } from "@typegoose/typegoose";
import { CITY_STATUS, RACE_ACTIVITY_STATUS, RACE_EVENT } from "../../consts";
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";
export class GateMembersRec {

View File

@@ -238,5 +238,11 @@
"activityType": 40,
"name": "LUCKY_TURNTABLE",
"string": "幸运转盘"
},
{
"id": 41,
"activityType": 41,
"name": "TIME_LIMIT_RANK",
"string": "限时排行榜"
}
]