Skip to content

Commit

Permalink
wb: fixup fix handling of extra_recruit and [filter_recall]
Browse files Browse the repository at this point in the history
this was probably lost during rebasing.
  • Loading branch information
gfgtdf authored and Vultraz committed May 20, 2018
1 parent 23732cf commit 0f2b4fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/whiteboard/recall.cpp
Expand Up @@ -226,7 +226,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());
});
Expand Down
2 changes: 1 addition & 1 deletion src/whiteboard/recruit.cpp
Expand Up @@ -199,7 +199,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) {
Expand Down

0 comments on commit 0f2b4fa

Please sign in to comment.