🐞 fix(gvg): 修复防御cd,积分点驻守变更
This commit is contained in:
@@ -478,7 +478,7 @@ export class GVGBattleHandler {
|
||||
// 计算并更新两支队伍耐久
|
||||
let { win, fail } = gameData.gvgBattleDurabilityMinus;
|
||||
attackTeam = await GVGTeamModel.battleEndAttack(attackTeam.teamCode, isSuccess? -win: -fail, getBirthAreaOfCity(city, attackTeam.leagueCode), await getTechReviveMinus(groupKey, configId, attackTeam.leagueCode));
|
||||
defenseTeam = await GVGTeamModel.battleEndDefense(defenseTeam.teamCode, isSuccess? -fail: -win, getBirthAreaOfCity(city, defenseTeam.leagueCode), await getTechReviveMinus(groupKey, configId, defenseTeam.leagueCode));
|
||||
defenseTeam = await GVGTeamModel.battleEndDefense(defenseTeam.teamCode, isSuccess? -fail: -win, getBirthAreaOfCity(city, defenseTeam.leagueCode), GVG.GVG_DEFAULT_DEFENSE_CD, await getTechReviveMinus(groupKey, configId, defenseTeam.leagueCode));
|
||||
if(defenseTeam.curTeamBreak && defenseTeam.originPointId > 0 && !defenseTeam.isCatapult) { // 打败的对手原来占领着一个位置,现在这个位置是你的了
|
||||
if(!attackTeam.curTeamBreak) {
|
||||
attackTeam = await GVGTeamModel.settlePoint(attackTeam.teamCode, defenseTeam.originPointId);
|
||||
@@ -536,7 +536,7 @@ export class GVGBattleHandler {
|
||||
if (!city) return resResult(STATUS.GVG_CITY_NOT_FOUND);
|
||||
|
||||
let hurt = await getTechKnifeHurt(configId, attackTeam.leagueCode);
|
||||
defenseTeam = await GVGTeamModel.battleEndDefense(oppoTeamCode, -hurt, getBirthAreaOfCity(city, defenseTeam.leagueCode), await getTechReviveMinus(groupKey, configId, defenseTeam.leagueCode));
|
||||
defenseTeam = await GVGTeamModel.battleEndDefense(oppoTeamCode, -hurt, getBirthAreaOfCity(city, defenseTeam.leagueCode), 0, await getTechReviveMinus(groupKey, configId, defenseTeam.leagueCode));
|
||||
if(defenseTeam.curTeamBreak && defenseTeam.originPointId > 0 && !defenseTeam.isCatapult) { // 打败的对手原来占领着一个位置,现在这个位置是你的了
|
||||
if(!attackTeam.curTeamBreak) {
|
||||
attackTeam = await GVGTeamModel.settlePoint(attackTeam.teamCode, defenseTeam.originPointId);
|
||||
|
||||
@@ -106,7 +106,7 @@ export function checkMoveStatus(team: GVGTeamType, cityId: number, areaId: numbe
|
||||
if(team.pointId > 0) return STATUS.GVG_BATTLE_TEAM_IS_SELLTED;
|
||||
if(team.stopMoveTime > nowSeconds()) return STATUS.GVG_BATTLE_IS_MOVING;
|
||||
if(team.moveCdTime > nowSeconds()) return STATUS.GVG_BATTLE_IS_MOVING_CD;
|
||||
if(team.lockTime > nowSeconds()) return STATUS.GVG_TEAM_DEFENSEING;
|
||||
if(team.lockTime > nowSeconds()) return STATUS.GVG_BATTLE_TEAM_LOCK;
|
||||
if(team.restartTime > nowSeconds()) return STATUS.GVG_BATTLE_TEAM_REVIVE;
|
||||
let dicArea = gameData.gvgArea.get(areaId);
|
||||
if(!dicArea) return STATUS.DIC_DATA_NOT_FOUND;
|
||||
@@ -663,7 +663,7 @@ export async function pushTeamBeHurtMessage(team: GVGTeamType, replaceTeam?: GVG
|
||||
|
||||
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(team.originPointId, replaceTeam && !replaceTeam.curTeamBreak, replaceTeam)
|
||||
cityId: team.cityId, areaId: team.fromAreaId, targetPointId: team.pointId, originPointId: team.originPointId, point: new GVGTeamInListOnPoint(team.originPointId, replaceTeam && !replaceTeam.curTeamBreak, replaceTeam)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user