mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +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.
|
||||
if(GetPlayer()->IsFriendlyTo(TargetUnit))
|
||||
return;
|
||||
// Not let attack through obstructions
|
||||
if(!pet->IsWithinLOSInMap(TargetUnit))
|
||||
return;
|
||||
|
||||
if(pet->getVictim())
|
||||
pet->AttackStop();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "6853"
|
||||
#define REVISION_NR "6854"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue