🐞 fix(gvg): 离开城池后据点数据处理
This commit is contained in:
@@ -49,6 +49,9 @@ class GVGBattleData {
|
||||
for(let teamCode of teamCodes) {
|
||||
let team = this.teams.get(teamCode);
|
||||
if(team) team.setCity(0);
|
||||
for(let [_areaId, teamSet] of this.areaToTeams) {
|
||||
if(teamSet.has(teamCode)) teamSet.delete(teamCode);
|
||||
}
|
||||
}
|
||||
this.rolePoints.delete(roleId);
|
||||
}
|
||||
@@ -171,7 +174,7 @@ export async function initTeamToMem() {
|
||||
let sid = pinus.app.getServerId();
|
||||
let servers = pinus.app.getServersByType('guild');
|
||||
let { configId, period } = getGVGPeriodData();
|
||||
// if(period != GVG_PERIOD.BATTLE) return;
|
||||
if(period != GVG_PERIOD.BATTLE) return;
|
||||
let teams = await GVGTeamModel.findByConfigId(configId);
|
||||
for(let team of teams) {
|
||||
if(dispatch(team.cityId.toString(), servers)?.id == sid) {
|
||||
|
||||
Reference in New Issue
Block a user