diff options
| author | raczman <none@none> | 2009-05-21 23:17:52 +0200 |
|---|---|---|
| committer | raczman <none@none> | 2009-05-21 23:17:52 +0200 |
| commit | b0a48f60c92291c80ff40379316787e77f46321d (patch) | |
| tree | 1f62c98cd9e3c330b3e7f50c7b013b26741e27d3 /src/game/PetHandler.cpp | |
| parent | 2f27bde026d3b514d696b17fd415c9218f5496d7 (diff) | |
Added new config option: vmap.petLOS
Enabling it makes pets do LOS check before attacking its target.
--HG--
branch : trunk
Diffstat (limited to 'src/game/PetHandler.cpp')
| -rw-r--r-- | src/game/PetHandler.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index a3644371f47..350c390d86c 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -115,9 +115,14 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data ) 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); if(pet->GetTypeId() != TYPEID_PLAYER && ((Creature*)pet)->IsAIEnabled) |
