活动:转盘修改记录
This commit is contained in:
@@ -10,7 +10,6 @@ import { getPlayerThirtyDaysData, playerThirtyDaysActivityDays, } from './thirty
|
||||
import { getPlayerVipRechargeMoneyData, } from './vipRechargeMoneyService';
|
||||
import { getPlayerActivityData, } from './selfServiceShopActivityService';
|
||||
import { ActivitySelfServiceGoodsModel } from '../../db/ActivitySelfServiceGoods';
|
||||
import { RoleModel } from '../../db/Role';
|
||||
import moment = require('moment');
|
||||
import { getPlayerTreasureHuntData, getTreasureHuntData } from './treasureHuntService';
|
||||
import { getPlayerPopUpShopData } from './popUpShopService';
|
||||
@@ -33,6 +32,7 @@ import { ActivityGroupModel } from '../../db/ActivityGroup';
|
||||
import { ActivityGroupTypeModel } from '../../db/ActivityGroupType';
|
||||
import { ServerlistModel } from '../../db/Serverlist';
|
||||
import { ActivityInRemote, transActivityInRemoteToModelType } from '../../domain/activityField/activityField';
|
||||
import { getPlayerLuckyTurntableDataShow } from './luckyTurntableService';
|
||||
|
||||
/**
|
||||
* 获取活动数据
|
||||
@@ -186,6 +186,11 @@ export async function getActivity(serverId: number, roleId: string, activityId:
|
||||
activityData = await getPlayerNewHeroGachaData(activityId, serverId, roleId);
|
||||
break;
|
||||
}
|
||||
case ACTIVITY_TYPE.LUCKY_TURNTABLE://幸运转盘
|
||||
{
|
||||
activityData = await getPlayerLuckyTurntableDataShow(activityId, serverId, roleId);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
console.log('未知活动类型.........', activityType)
|
||||
break;
|
||||
|
||||
@@ -40,7 +40,7 @@ export default class Activity_Turntable_Rec extends BaseModel {
|
||||
@prop({ required: true })
|
||||
refTodayCount: Date; // 本日抽卡刷新时间
|
||||
|
||||
@prop({ required: true, type: TurntableRecord })
|
||||
@prop({ required: true, type: TurntableRecord, _id: false })
|
||||
records: TurntableRecord[]; // 本日抽卡刷新时间
|
||||
|
||||
@prop({ required: true, type: Number })
|
||||
|
||||
@@ -96,7 +96,7 @@ export class LuckyTurntableData extends ActivityBase {
|
||||
}
|
||||
|
||||
public pull(roleName: string, count: number) {
|
||||
let records: TurntableRecord[] = [];
|
||||
let records: (string|number)[][] = [];
|
||||
let result: number[] = [];
|
||||
let goodResult: RewardInter[] = [];
|
||||
for(let i = 0; i < count; i++) {
|
||||
@@ -114,7 +114,7 @@ export class LuckyTurntableData extends ActivityBase {
|
||||
this.count++;
|
||||
this.todayCount++;
|
||||
let record = { roleName, gid: randResult.gid, count: randResult.count };
|
||||
records.push(record);
|
||||
records.push([record.roleName, record.gid, record.count]);
|
||||
this.records.push(record);
|
||||
result.push(randResult.id);
|
||||
goodResult.push({ id: randResult.gid, count: randResult.count });
|
||||
@@ -171,8 +171,9 @@ export class LuckyTurntableData extends ActivityBase {
|
||||
|
||||
public getShowResult() {
|
||||
return {
|
||||
...pick(this, ['cost', 'freeCount', 'todayCount', 'count', 'box', 'records']),
|
||||
pool: this.pool.map(pool => pool.getShowResult())
|
||||
...pick(this, ['cost', 'freeCount', 'todayCount', 'count', 'box']),
|
||||
pool: this.pool.map(pool => pool.getShowResult()),
|
||||
records: this.records.map(record => [record.roleName, record.gid, record.count])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -232,5 +232,11 @@
|
||||
"activityType": 39,
|
||||
"name": "NEW_HERO_GACHA",
|
||||
"string": "新将擢迁(新武将抽取)"
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"activityType": 40,
|
||||
"name": "LUCKY_TURNTABLE",
|
||||
"string": "幸运转盘"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user