🐞 fix(gvg): 可能可以修好据点锁问题

This commit is contained in:
luying
2023-03-09 10:06:04 +08:00
parent 50a3c7e872
commit 686501d75d
4 changed files with 28 additions and 22 deletions

View File

@@ -398,7 +398,7 @@ export async function catapultHurt() {
for(let team of teams) {
await pushTeamBeHurtMessage(team);
if(team.curTeamBreak && team.originPointId > 0) {
await GVGCityAreaPointModel.leavePoint(configId, teamObj.groupKey, team.originPointId);
await GVGCityAreaPointModel.leavePoint(configId, teamObj.groupKey, team.teamCode);
}
if(!roleToTeams.has(team.roleId)) roleToTeams.set(team.roleId, []);
roleToTeams.get(team.roleId).push(new GVGTeamInList(team));
@@ -674,9 +674,9 @@ export async function battleEndSendMessage(groupKey: string, cityId: number, def
export async function pushTeamBeHurtMessage(team: GVGTeamType, replaceTeam?: GVGTeamType) {
if(team.curTeamBreak && team.originPointId > 0) {
await sendMessageToGVGAreaByTeamWithSuc(team.groupKey, team.fromAreaId, PUSH_ROUTE.GVG_AREA_POINT_CHANGE, {
cityId: team.cityId, areaId: team.fromAreaId, targetPointId: team.originPointId, originPointId: replaceTeam?.originPointId??0, point: new GVGTeamInListOnPoint(replaceTeam.pointId||team.pointId, true, replaceTeam||team)
cityId: team.cityId, areaId: team.fromAreaId, targetPointId: team.originPointId, originPointId: replaceTeam?.originPointId??0, point: new GVGTeamInListOnPoint(replaceTeam?.pointId||team.pointId, true, replaceTeam||team)
});
if(!replaceTeam.curTeamBreak && replaceTeam.originPointId > 0) {
if(replaceTeam && !replaceTeam.curTeamBreak && replaceTeam.originPointId > 0) {
await sendMessageToGVGAreaByTeamWithSuc(replaceTeam.groupKey, replaceTeam.fromAreaId, PUSH_ROUTE.GVG_AREA_POINT_CHANGE, {
cityId: replaceTeam.cityId, areaId: replaceTeam.fromAreaId, targetPointId: replaceTeam.originPointId, originPointId: 0, point: new GVGTeamInListOnPoint(replaceTeam.pointId, true, replaceTeam)
});