From d09da157b05c94d91362beac6e0e1be3a848b30e Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 28 Sep 2022 17:18:43 +0800 Subject: [PATCH] 1 --- server/gameserver/pvedata.cc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/server/gameserver/pvedata.cc b/server/gameserver/pvedata.cc index 3253d0c8..abbfe25f 100644 --- a/server/gameserver/pvedata.cc +++ b/server/gameserver/pvedata.cc @@ -91,15 +91,19 @@ void PveData::OnBeKill(Hero* hero) }); } if (room->IsDestoryRoom()) { - if (GetWave() < room->pve_mode_meta->next_door.size()) { - a8::Vec2 point = room->pve_mode_meta->next_door[room->pve_data.GetWave()]; - #if 0 - room->CreateObstacle(PVE_DOOR_THING_ID, point.x, point.y); - #endif - FlyDoor(room, point, 50); + if (GetWave() + 1 < max_wave) { + if (GetWave() < room->pve_mode_meta->next_door.size()) { + a8::Vec2 point = room->pve_mode_meta->next_door[room->pve_data.GetWave()]; +#if 0 + room->CreateObstacle(PVE_DOOR_THING_ID, point.x, point.y); +#endif + FlyDoor(room, point, 50); + } } } else { - room->GetIncubator()->NextWave(); + if (GetWave() + 1 < max_wave) { + room->GetIncubator()->NextWave(); + } } } }