军团:试炼表修改
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { UserGuildModel, UserGuildType } from '../db/UserGuild';
|
||||
import { getArmyTrainJuDian, getTrainBaseByLv } from '../pubUtils/data';
|
||||
import { getArmyTrainJuDian, getGuildTrainGkInfo, getTrainBaseByLv } from '../pubUtils/data';
|
||||
import { nowSeconds, getZeroPoint } from '../pubUtils/timeUtil';
|
||||
import { GUILD_STRUCTURE } from '../consts';
|
||||
import { GuildTrainType, GuildTrainModel, TrainInstance } from '../db/GuildTrain';
|
||||
@@ -150,19 +150,15 @@ export async function resetTrain(code: string, serverId: number) {
|
||||
const userGuildList = await UserGuildModel.getListByGuild(code, 'trainRewards', {});
|
||||
const guildTrains = await GuildTrainModel.getGuildTrainBoxs(code);
|
||||
|
||||
let { shilianRewardRatio } = getTrainBaseByLv(GUILD_STRUCTURE.TRAIN);
|
||||
//结算未领取的宝箱奖励发送到邮件中
|
||||
userGuildList.forEach(async function ({roleId, trainRewards}) {
|
||||
let goods: { id: number, count: number }[] = [];
|
||||
guildTrains.forEach(guildTrain=>{
|
||||
guildTrain.trainInstances.forEach(({ trainBoxs })=>{
|
||||
guildTrain.trainInstances.forEach(({ trainBoxs, hid })=>{
|
||||
if (!findWhere(trainBoxs, {roleId})) {
|
||||
let { heroRewards } = getArmyTrainJuDian(guildTrain.trainId);
|
||||
let { heroRewards } = getGuildTrainGkInfo(guildTrain.trainId, hid);
|
||||
let good = getRandSingleEelm(heroRewards);
|
||||
goods.push({
|
||||
id: good.id,
|
||||
count: Math.floor((100 + shilianRewardRatio) * good.count/100)
|
||||
});
|
||||
goods.push(good);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user