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