fix attacks beein wrongly disabled

as said in the comment, that get_special_bool might return the wrong value, as since 5f58cd7c6d the bc_vector no longer contains disabled attacks we can just remove this code.

fixes #3324
This commit is contained in:
gfgtdf 2018-07-17 14:22:39 +02:00
parent 97b5612691
commit 44734570dd

View file

@ -980,12 +980,7 @@ int mouse_handler::show_attack_dialog(const map_location& attacker_loc, const ma
std::vector<battle_context> bc_vector;
const int best = fill_weapon_choices(bc_vector, attacker, defender);
//TODO: this "disable" check has no attack context.
const bool all_disabled = std::all_of(bc_vector.begin(), bc_vector.end(),
[](battle_context& context) { return (*context.get_attacker_stats().weapon).get_special_bool("disable"); }
);
if((*attacker).attacks().empty() || all_disabled) {
if((*attacker).attacks().empty()) {
gui2::show_transient_message("No Attacks", _("This unit has no usable weapons."));
return -1;