mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Use another helper and revert one instance HasPlayerFlag
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user