diff options
author | megamage <none@none> | 2009-05-25 12:51:14 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-25 12:51:14 -0500 |
commit | 00f50798d365c0318b10a012c8985edb3c1f87c7 (patch) | |
tree | c26543841923604c6bc4ea382a99127d971327fd /src/game/PetHandler.cpp | |
parent | dfd041dd578df2a7d431831aa00676ab6b543b97 (diff) | |
parent | fcbcf595113bb9b2c256fd5652adafa79ba89b78 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/PetHandler.cpp')
-rw-r--r-- | src/game/PetHandler.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index 459055383cf..348af684411 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -30,6 +30,7 @@ #include "CreatureAI.h" #include "Util.h" #include "Pet.h" +#include "World.h" void WorldSession::HandlePetAction( WorldPacket & recv_data ) { @@ -122,9 +123,14 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid return; // Not let attack through obstructions - //if(!pet->IsWithinLOSInMap(TargetUnit)) - // return; + if(sWorld.getConfig(CONFIG_PET_LOS)) + { + + if(!pet->IsWithinLOSInMap(TargetUnit)) + return; + } + pet->clearUnitState(UNIT_STAT_FOLLOW); // This is true if pet has no target or has target but targets differs. if(pet->getVictim() != TargetUnit) |