diff --git a/src/strategy/values/InvalidTargetValue.cpp b/src/strategy/values/InvalidTargetValue.cpp index 13c25796..cd2df0f5 100644 --- a/src/strategy/values/InvalidTargetValue.cpp +++ b/src/strategy/values/InvalidTargetValue.cpp @@ -5,6 +5,7 @@ #include "InvalidTargetValue.h" #include "AttackersValue.h" #include "Playerbots.h" +#include "Unit.h" bool InvalidTargetValue::Calculate() { @@ -16,6 +17,10 @@ bool InvalidTargetValue::Calculate() if (target && qualifier == "current target") { return target->GetMapId() != bot->GetMapId() || + target->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE) || + target->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE) || + target->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE_2) || + !target->IsVisible() || !target->IsAlive() || target->IsPolymorphed() || target->IsCharmed() ||