From 6dc06ab53b2e5307b682c5723b3c6fd62318633e Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 7 Mar 2009 00:53:30 -0600 Subject: *Fix a bug that possessed creature cannot melee. --HG-- branch : trunk --- src/game/PetHandler.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index 19b05797618..b87193b7e9f 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -118,10 +118,9 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data ) //if(!pet->IsWithinLOSInMap(TargetUnit)) // return; - if(pet->GetTypeId() != TYPEID_PLAYER) + if(pet->GetTypeId() != TYPEID_PLAYER && ((Creature*)pet)->IsAIEnabled) { - if (((Creature*)pet)->IsAIEnabled) - ((Creature*)pet)->AI()->AttackStart(TargetUnit); + ((Creature*)pet)->AI()->AttackStart(TargetUnit); //10% chance to play special pet attack talk, else growl if(((Creature*)pet)->isPet() && ((Pet*)pet)->getPetType() == SUMMON_PET && pet != TargetUnit && urand(0, 100) < 10) -- cgit v1.2.3