Fixed nightstalk ability not working (bug #24696)

This commit is contained in:
Elvish_Hunter 2016-05-31 21:12:20 +02:00
parent eafba52b60
commit 50da18ebba

View file

@ -268,14 +268,14 @@ bool terrain_filter::match_internal(const map_location& loc, const bool ignore_x
if(!tod_type.empty()) {
const std::vector<std::string>& vals = utils::split(tod_type);
if(tod.lawful_bonus<0) {
if(std::find(vals.begin(),vals.end(),std::to_string(unit_type::ALIGNMENT::CHAOTIC)) == vals.end()) {
if(std::find(vals.begin(),vals.end(),unit_type::ALIGNMENT::enum_to_string(unit_type::ALIGNMENT::CHAOTIC)) == vals.end()) {
return false;
}
} else if(tod.lawful_bonus>0) {
if(std::find(vals.begin(),vals.end(),std::to_string(unit_type::ALIGNMENT::LAWFUL)) == vals.end()) {
if(std::find(vals.begin(),vals.end(),unit_type::ALIGNMENT::enum_to_string(unit_type::ALIGNMENT::LAWFUL)) == vals.end()) {
return false;
}
} else if(std::find(vals.begin(),vals.end(),std::to_string(unit_type::ALIGNMENT::NEUTRAL)) == vals.end()) {
} else if(std::find(vals.begin(),vals.end(),unit_type::ALIGNMENT::enum_to_string(unit_type::ALIGNMENT::NEUTRAL)) == vals.end()) {
return false;
}
}