Core/Entities: Replace Unit::canAttack usage with more accurate Unit::IsValidAttackTarget

This commit is contained in:
QAston
2011-09-16 23:49:31 +02:00
parent 3a3f2d927f
commit c0b1823524
15 changed files with 23 additions and 19 deletions
+1 -1
View File
@@ -23029,7 +23029,7 @@ void Player::UpdateCharmedAI()
GetMotionMaster()->MoveFollow(charmer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
Unit* target = getVictim();
if (!target || !charmer->canAttack(target))
if (!target || !charmer->IsValidAttackTarget(target))
{
target = charmer->SelectNearestTarget();
if (!target)