mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +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
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue