🐞 fix(gvg): 积分点交换问题

This commit is contained in:
luying
2023-03-08 12:32:09 +08:00
parent 96ea790bd1
commit 52debbd8b3
2 changed files with 7 additions and 8 deletions

View File

@@ -672,14 +672,13 @@ 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?.pointId??0, point: new GVGTeamInListOnPoint(team.pointId, true, 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(!team.curTeamBreak) {
if(!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.pointId, originPointId: replaceTeam.originPointId, point: new GVGTeamInListOnPoint(replaceTeam.pointId, true, replaceTeam)
cityId: replaceTeam.cityId, areaId: replaceTeam.fromAreaId, targetPointId: replaceTeam.originPointId, originPointId: 0, point: new GVGTeamInListOnPoint(replaceTeam.pointId, true, replaceTeam)
});
}
}