wb: fixup fix handling of extra_recruit and [filter_recall]
this was probably lost during rebasing.
This commit is contained in:
parent
1a3625dbbe
commit
77a4d19819
2 changed files with 2 additions and 2 deletions
|
@ -234,7 +234,7 @@ action::error recall::check_validity() const
|
|||
return NOT_ENOUGH_GOLD;
|
||||
}
|
||||
//Check that there is a leader available to recall this unit
|
||||
bool has_recruiter = any_recruiter(team_index() - 1, get_recall_hex(), [&](unit& leader) {
|
||||
bool has_recruiter = any_recruiter(team_index() + 1, get_recall_hex(), [&](unit& leader) {
|
||||
const unit_filter ufilt(vconfig(leader.recall_filter()));
|
||||
return ufilt(*temp_unit_, map_location::null_location());
|
||||
});
|
||||
|
|
|
@ -209,7 +209,7 @@ action::error recruit::check_validity() const
|
|||
//Check that unit to recruit is still in side's recruit list
|
||||
const std::set<std::string>& recruits = resources::gameboard->teams()[team_index()].recruits();
|
||||
if(recruits.find(unit_name_) == recruits.end()) {
|
||||
bool in_extra_recruit = any_recruiter(team_index() - 1, get_recruit_hex(), [&](unit& leader) {
|
||||
bool in_extra_recruit = any_recruiter(team_index() + 1, get_recruit_hex(), [&](unit& leader) {
|
||||
return std::find(leader.recruits().begin(), leader.recruits().end(), unit_name_) != leader.recruits().end();
|
||||
});
|
||||
if (!in_extra_recruit) {
|
||||
|
|
Loading…
Add table
Reference in a new issue