🐞 fix(gvg): 备战期等级奖励随人

This commit is contained in:
luying
2023-03-17 12:04:16 +08:00
parent 6c72d20b1c
commit 710f10d516
5 changed files with 48 additions and 14 deletions

View File

@@ -14,6 +14,7 @@ import { RoleRankInfo } from "../rank";
import { GVGCityType } from "../../db/GVGCity";
import { GVGTeamMem } from "../battleField/gvgBattle";
import { GVGTeamType } from "../../db/GVGTeam";
import GVGRoleData, { GVGRoleDataType } from "../../db/GVGRoleData";
class LeagueLeaderInfo {
name: string; // 盟主名
@@ -124,16 +125,18 @@ export class GVGMainData {
this.fighterCnt = leaguePrepare.fighterCnt;
}
setPlayerInfo(userData: GVGUserDataType, auth: number, canPrepare: boolean, canChooseJob: boolean, items: GVGItem[], tasks: GVGTask[]) {
setPlayerInfo(userData: GVGUserDataType, roleData: GVGRoleDataType, auth: number, canPrepare: boolean, canChooseJob: boolean, items: GVGItem[], tasks: GVGTask[]) {
this.myInfo.auth = auth;
this.myInfo.canPrepare = canPrepare;
this.myInfo.canChooseJob = canChooseJob;
this.myInfo.items = items;
if(userData) {
this.myInfo.job = userData?.job||0;
this.myInfo.receivedLv = userData?.receivedLv||0;
this.myInfo.reviveCnt = userData?.reviveCnt||0;
}
if(roleData) {
this.myInfo.receivedLv = roleData?.receivedLv||0;
}
this.myInfo.tasks = tasks;
}