🐞 fix(gvg): 离开城池的路由错误
This commit is contained in:
@@ -229,14 +229,18 @@ export async function leaveCity(isForce: boolean, roleId: string, serverId: numb
|
||||
if(myLeague) await GVGUserDataModel.changeCity(configId, myLeague.leagueCode, roleId, 0);
|
||||
await GVGCityAreaPointModel.playerLeave(configId, groupKey, roleId);
|
||||
// 处理内存数据
|
||||
let teamObj = getGVGBattleData(groupKey);
|
||||
teamObj.leaveCity(roleId);
|
||||
for(let team of teams) {
|
||||
if(team.cityId > 0 && team.areaId > 0) {
|
||||
await sendMessageToGVGAreaByTeamWithSuc(groupKey, team.areaId, PUSH_ROUTE.GVG_PLAYER_LEAVE_AREA, {
|
||||
cityId: team.cityId, areaId: team.areaId, teamCode: team.teamCode
|
||||
});
|
||||
}
|
||||
await pinus.app.rpc.guild.guildRemote.leaveCityMem.broadcast(groupKey, roleId, teams);
|
||||
}
|
||||
}
|
||||
|
||||
export async function leaveCityMem(groupKey: string, roleId: string, teams: GVGTeamType[]) {
|
||||
let teamObj = getGVGBattleData(groupKey);
|
||||
teamObj.leaveCity(roleId);
|
||||
for(let team of teams) {
|
||||
if(team.cityId > 0 && team.areaId > 0) {
|
||||
await sendMessageToGVGAreaByTeamWithSuc(groupKey, team.areaId, PUSH_ROUTE.GVG_PLAYER_LEAVE_AREA, {
|
||||
cityId: team.cityId, areaId: team.areaId, teamCode: team.teamCode
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user