✨ feat(gvg): 激战期获取挑战对手阵容
This commit is contained in:
@@ -89,10 +89,7 @@ export default class GVGTeam extends BaseModel {
|
||||
defenseTime: number; // 防守保护时间
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
playerScore: number; // 积分
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
leagueScore: number; // 积分
|
||||
score: number; // 积分
|
||||
|
||||
@prop({ required: true, type: () => GVGHeroInfo, _id: false })
|
||||
lineup: GVGHeroInfo[];
|
||||
@@ -216,8 +213,8 @@ export default class GVGTeam extends BaseModel {
|
||||
}
|
||||
|
||||
// 结算挑战方
|
||||
public static async battleEndAttack(teamCode: string, hpInc: number, playerScoreInc: number, leagueScoreInc: number) {
|
||||
const team: GVGTeamType = await GVGTeamModel.findOneAndUpdate({ teamCode }, { $inc: { durability: hpInc, playerScore: playerScoreInc, leagueScore: leagueScoreInc } }, { new: true }).lean();
|
||||
public static async battleEndAttack(teamCode: string, hpInc: number, playerScoreInc: number) {
|
||||
const team: GVGTeamType = await GVGTeamModel.findOneAndUpdate({ teamCode }, { $inc: { durability: hpInc, playerScore: playerScoreInc } }, { new: true }).lean();
|
||||
return team;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user