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 committed by GitHub
parent 3939d1b202
commit 64e34f26d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1276,12 +1276,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;