🐞 fix(巅峰演武): 赛季切换后结算不再计入

This commit is contained in:
luying
2022-12-09 16:20:30 +08:00
parent 254e063774
commit fb42aae569
4 changed files with 22 additions and 13 deletions

View File

@@ -35,6 +35,8 @@ class Record {
bossDamage?: number; // boss本造成的伤害
@prop({ required: false })
encourageCnt?: number;
@prop({ required: false })
pvpSeasonNum?: number;
}
@index({ roleId: 1, battleId: 1 })

View File

@@ -134,8 +134,10 @@ export default class PvpRecord extends BaseModel {
@prop({ required: true, default: 0 })
createTime: number;
@prop({ required: true, default: 0 })
timeout: boolean;
public static async createRec(param: { roleId1: string, roleId2: string, warId: number, attackInfo: PvpRecordPlayerInfo, defenseInfo: PvpRecordPlayerInfo, createTime: number }) {
public static async createRec(param: { roleId1: string, roleId2: string, warId: number, attackInfo: PvpRecordPlayerInfo, defenseInfo: PvpRecordPlayerInfo, createTime: number, timeout?: boolean }) {
await this.delPvpRecords();
let code = genCode(6);
const result = await PvpRecordModel.findOneAndUpdate({ code }, param, { new: true, upsert: true }).lean();

View File

@@ -62,6 +62,7 @@ export class HeroParam {
ePlace: EPlace[]; // 武将装备引用数组
artifact: number = 0;
subHid: number = 0;
talent: Talent[] = [];
usedTalentPoint: number = 0;
totalTalentPoint: number = 0;
@@ -96,6 +97,7 @@ export class HeroParam {
}
this.ePlace = hero.ePlace;
this.artifact = hero.artifact;
this.subHid = hero.subHid;
}
}