diff --git a/server/gameserver/incubator.cc b/server/gameserver/incubator.cc index a096f511..d4a431fb 100644 --- a/server/gameserver/incubator.cc +++ b/server/gameserver/incubator.cc @@ -412,8 +412,11 @@ void Incubator::NextWave() [this] (Player* hum, a8::XParams& param) { cs::SMPvePassWave notify_msg; - notify_msg.set_new_wave(hum->room->pve_data.GetWave() + 1); - notify_msg.set_pve_max_wave(room->pve_data.max_wave); + int next_wave = hum->room->pve_data.GetWave() + 1 + 1; + int max_wave = room->pve_data.max_wave; + next_wave = std::max(next_wave, max_wave); + notify_msg.set_new_wave(next_wave); + notify_msg.set_pve_max_wave(max_wave); hum->SendNotifyMsg(notify_msg); return true; });