mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-25 22:46:25 +00: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)
|
bool FollowAction::CanDeadFollow(Unit* target)
|
||||||
{
|
{
|
||||||
// Move to corpse when dead and player is alive or not a ghost.
|
// 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 false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ bool InvalidTargetValue::Calculate()
|
|||||||
return target->GetMapId() != bot->GetMapId() || target->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE) ||
|
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->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE) || target->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE_2) ||
|
||||||
!target->IsVisible() || !target->IsAlive() || target->IsPolymorphed() || target->IsCharmed() ||
|
!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);
|
!AttackersValue::IsValidTarget(target, bot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user