[svn] Remove isVisible function. Check stealth and invisible in canAttack();
Use new remove aura by interrupt flag function. --HG-- branch : trunk
This commit is contained in:
1 parent
fdff7330d2
commit
fd3fcb4612
23 files changed
+128
-128
No files matched your search
+2
-2
@@ -48,7 +48,7 @@ void PetAI::MoveInLineOfSight(Unit *u)
|
||||
{
|
||||
if( !i_pet.getVictim() && i_pet.GetCharmInfo() &&
|
||||
i_pet.GetCharmInfo()->HasReactState(REACT_AGGRESSIVE) &&
|
||||
u->isTargetableForAttack() && i_pet.IsHostileTo( u ) &&
|
||||
i_pet.IsHostileTo( u ) && i_pet.canAttack(u) &&
|
||||
u->isInAccessablePlaceFor(&i_pet))
|
||||
{
|
||||
float attackRadius = i_pet.GetAttackDistance(u);
|
||||
@@ -95,7 +95,7 @@ bool PetAI::_needToStop() const
|
||||
if(i_pet.isCharmed() && i_pet.getVictim() == i_pet.GetCharmer())
|
||||
return true;
|
||||
|
||||
return !i_pet.getVictim()->isTargetableForAttack();
|
||||
return !i_pet.canAttack(i_pet.getVictim());
|
||||
}
|
||||
|
||||
void PetAI::_stopAttack()
|
||||
|
||||
Reference in new issue
Block a user