aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-07 00:53:30 -0600
committermegamage <none@none>2009-03-07 00:53:30 -0600
commit6dc06ab53b2e5307b682c5723b3c6fd62318633e (patch)
treeb42f455a04091e5a0b53e3a56d970f439b2355a8 /src
parent5627f5e8383e879aba32623c95169f48af0e147b (diff)
*Fix a bug that possessed creature cannot melee.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/PetHandler.cpp5
1 files changed, 2 insertions, 3 deletions
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)