[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

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

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "6853"
#define REVISION_NR "6854"
#endif // __REVISION_NR_H__