Use another helper and revert one instance HasPlayerFlag

This commit is contained in:
Revision
2024-12-02 00:28:08 +01:00
parent f0ccb0a371
commit fe896c1d3d
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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);
}