diff options
author | megamage <none@none> | 2009-01-30 18:10:05 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-01-30 18:10:05 -0600 |
commit | 8fee06f041fbfbc7e22eccc03a8f12bd7a649999 (patch) | |
tree | 9512260148dabb87926131a225831e72980a250d /src/game/PetAI.cpp | |
parent | 03234a0657eca4836b1015556973629893c76958 (diff) |
*AI structure update.
--HG--
branch : trunk
Diffstat (limited to 'src/game/PetAI.cpp')
-rw-r--r-- | src/game/PetAI.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp index bce8a4d8f59..67607defba0 100644 --- a/src/game/PetAI.cpp +++ b/src/game/PetAI.cpp @@ -38,7 +38,7 @@ int PetAI::Permissible(const Creature *creature) return PERMIT_BASE_NO; } -PetAI::PetAI(Creature *c) : i_pet(*c), i_tracker(TIME_INTERVAL_LOOK), inCombat(false) +PetAI::PetAI(Creature *c) : CreatureAI(c), i_pet(*c), i_tracker(TIME_INTERVAL_LOOK), inCombat(false) { m_AllySet.clear(); UpdateAllies(); @@ -87,11 +87,6 @@ void PetAI::EnterEvadeMode() { } -bool PetAI::IsVisible(Unit *pl) const -{ - return _isVisible(pl); -} - bool PetAI::_needToStop() const { // This is needed for charmed creatures, as once their target was reset other effects can trigger threat @@ -291,13 +286,6 @@ void PetAI::UpdateAI(const uint32 diff) } } -bool PetAI::_isVisible(Unit *u) const -{ - //return false; //( ((Creature*)&i_pet)->GetDistanceSq(u) * 1.0<= sWorld.getConfig(CONFIG_SIGHT_GUARDER) && !u->m_stealth && u->isAlive()); - return i_pet.GetDistance(u) < sWorld.getConfig(CONFIG_SIGHT_GUARDER) - && u->isVisibleForOrDetect(&i_pet,true); -} - void PetAI::UpdateAllies() { Unit* owner = i_pet.GetCharmerOrOwner(); |