[6854] Prevent pets attack through obstructions.

Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
ApoC 2008-11-28 00:32:08 +01:00
parent 9fc7dd9ead
commit d922ea27b9
2 changed files with 5 additions and 2 deletions

View file

@ -99,7 +99,10 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
return;
// not let attack friendly units.
if( GetPlayer()->IsFriendlyTo(TargetUnit))
if(GetPlayer()->IsFriendlyTo(TargetUnit))
return;
// Not let attack through obstructions
if(!pet->IsWithinLOSInMap(TargetUnit))
return;
if(pet->getVictim())