From 0f2b4fae1def36036ce8df639a035876c4aa1332 Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Sun, 20 May 2018 12:42:03 +0200 Subject: [PATCH] wb: fixup fix handling of extra_recruit and [filter_recall] this was probably lost during rebasing. --- src/whiteboard/recall.cpp | 2 +- src/whiteboard/recruit.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whiteboard/recall.cpp b/src/whiteboard/recall.cpp index c196b9a1a055..90af408d3c12 100644 --- a/src/whiteboard/recall.cpp +++ b/src/whiteboard/recall.cpp @@ -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()); }); diff --git a/src/whiteboard/recruit.cpp b/src/whiteboard/recruit.cpp index 790d90387aa9..b539a54dfc9a 100644 --- a/src/whiteboard/recruit.cpp +++ b/src/whiteboard/recruit.cpp @@ -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& 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) {