aboutsummaryrefslogtreecommitdiff
path: root/src/game/PetAI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/PetAI.cpp')
-rw-r--r--src/game/PetAI.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp
index 61446220192..fb1b3121090 100644
--- a/src/game/PetAI.cpp
+++ b/src/game/PetAI.cpp
@@ -65,9 +65,12 @@ void PetAI::MoveInLineOfSight(Unit *u)
void PetAI::AttackStart(Unit *u)
{
- if( inCombat || !u || (i_pet.isPet() && ((Pet&)i_pet).getPetType() == MINI_PET) )
+ if( !u || (i_pet.isPet() && ((Pet&)i_pet).getPetType() == MINI_PET) )
return;
+ if (inCombat && i_pet.getVictim() && u != i_pet.getVictim())
+ i_pet.AttackStop();
+
if(i_pet.Attack(u,true))
{
i_pet.clearUnitState(UNIT_STAT_FOLLOW);