diff --git a/src/strategy/actions/FollowActions.cpp b/src/strategy/actions/FollowActions.cpp index 1c46f6d8..3c6ea0c9 100644 --- a/src/strategy/actions/FollowActions.cpp +++ b/src/strategy/actions/FollowActions.cpp @@ -101,7 +101,7 @@ bool FollowAction::isUseful() bool FollowAction::CanDeadFollow(Unit* target) { // Move to corpse when dead and player is alive or not a ghost. - if (!bot->IsAlive() && (target->IsAlive() || !target->HasPlayerFlag(PLAYER_FLAGS_GHOST))) + if (!bot->IsAlive() && (target->IsAlive() || !target->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))) return false; return true; diff --git a/src/strategy/values/InvalidTargetValue.cpp b/src/strategy/values/InvalidTargetValue.cpp index 63bf10c3..b6f943a1 100644 --- a/src/strategy/values/InvalidTargetValue.cpp +++ b/src/strategy/values/InvalidTargetValue.cpp @@ -21,7 +21,7 @@ bool InvalidTargetValue::Calculate() 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() || - target->isFeared() || target->HasUnitState(UNIT_STATE_ISOLATED) || target->IsFriendlyTo(bot) || + target->HasFearAura() || target->HasUnitState(UNIT_STATE_ISOLATED) || target->IsFriendlyTo(bot) || !AttackersValue::IsValidTarget(target, bot); }