TrinityCore/TrinityCore — Issue #5613: [PetAI] Fix - Pet LOS does not apply to command attack
Author: MrSmite
Created: 2012-03-09 05:38:28+00:00
State: open

Rev: 9f93681625f16b4a118df755eccb8ac80f713c16
OS: XP Sp3
DB: 46 + updates

Details

When a player clicks 'attack', pet LOS does not apply, pets should attack the target. This allows the player to target a creature in an instance and use the pet to pull by clicking "attack" and then "follow" after initial aggro.

Pet LOS should only apply for the AI automatic target selection

Patch

From f2f14ec11220f92f110fb946c313595c1258f84e Mon Sep 17 00:00:00 2001
From: MrSmite
Date: Fri, 9 Mar 2012 00:35:03 -0500
Subject: [PATCH] Pet LOS does not apply to command attack, only AI target selection

---
src/server/game/Handlers/PetHandler.cpp | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp
index 62f912f..a556b44 100755
--- a/src/server/game/Handlers/PetHandler.cpp
+++ b/src/server/game/Handlers/PetHandler.cpp
@@ -196,13 +196,6 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid
if (!owner->IsValidAttackTarget(TargetUnit))
return;

- // Not let attack through obstructions
- if (sWorld->getBoolConfig(CONFIG_PET_LOS))
- {
- if (!pet->IsWithinLOSInMap(TargetUnit))
- return;
- }
-
pet->ClearUnitState(UNIT_STATE_FOLLOW);
// This is true if pet has no target or has target but targets differs.
if (pet->getVictim() != TargetUnit || (pet->getVictim() == TargetUnit && !pet->GetCharmInfo()->IsCommandAttack()))
--
1.7.3.1.msysgit.0