diff --git a/src/game_events.cpp b/src/game_events.cpp index d02f5ad1df6..5aa238a2e78 100644 --- a/src/game_events.cpp +++ b/src/game_events.cpp @@ -409,9 +409,8 @@ void event_handler::handle_event(const queued_event& event_info, config* cfg) if(u->matches_filter(**ir)) { recruit_unit(*game_map,1,*units,*u,gamemap::location(), screen,false); - u = avail.erase(u); - if(u == avail.end()) - break; + avail.erase(u); + break; } } } diff --git a/src/unit.cpp b/src/unit.cpp index 38b5c8e2fef..f32621743bc 100644 --- a/src/unit.cpp +++ b/src/unit.cpp @@ -205,6 +205,8 @@ void unit::new_level() maxMovement_ = backupMaxMovement_; maxExperience_ = backupMaxExperience_; + role_ = ""; + //reapply all permanent modifications apply_modifications();