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(); + } } } }