Pets should inherit owner's hostility status for the purposes of target checking

Based on patch by Toni.Shocker
Fixes issue #3552

--HG--
branch : trunk
This commit is contained in:
silinoron
2010-08-23 14:46:10 -07:00
parent 181b995e38
commit e581feb551
2 changed files with 13 additions and 6 deletions
@@ -154,8 +154,9 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
if (!TargetUnit)
return;
if (!pet->canAttack(TargetUnit))
return;
if (Unit *owner = pet->GetOwner())
if (!owner->canAttack(TargetUnit))
return;
// Not let attack through obstructions
if (sWorld.getConfig(CONFIG_PET_LOS))