mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
fix invalid target
This commit is contained in:
@@ -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() ||
|
||||
|
||||
Reference in New Issue
Block a user