mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[6854] Prevent pets attack through obstructions.
Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
9fc7dd9ead
commit
d922ea27b9
2 changed files with 5 additions and 2 deletions
|
|
@ -101,6 +101,9 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
|
||||||
// not let attack friendly units.
|
// not let attack friendly units.
|
||||||
if(GetPlayer()->IsFriendlyTo(TargetUnit))
|
if(GetPlayer()->IsFriendlyTo(TargetUnit))
|
||||||
return;
|
return;
|
||||||
|
// Not let attack through obstructions
|
||||||
|
if(!pet->IsWithinLOSInMap(TargetUnit))
|
||||||
|
return;
|
||||||
|
|
||||||
if(pet->getVictim())
|
if(pet->getVictim())
|
||||||
pet->AttackStop();
|
pet->AttackStop();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "6853"
|
#define REVISION_NR "6854"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue