- Timestamp:
- 11/19/08 13:44:57 (17 years ago)
- Location:
- trunk/src/game
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/PetAI.cpp
r186 r191 66 66 void PetAI::AttackStart(Unit *u) 67 67 { 68 if( inCombat || !u || (i_pet.isPet() && ((Pet&)i_pet).getPetType() == MINI_PET) ) 69 return; 68 if( !u || (i_pet.isPet() && ((Pet&)i_pet).getPetType() == MINI_PET) ) 69 return; 70 71 if (inCombat && i_pet.getVictim() && u != i_pet.getVictim()) 72 i_pet.AttackStop(); 70 73 71 74 if(i_pet.Attack(u,true)) -
trunk/src/game/PetHandler.cpp
r174 r191 105 105 return; 106 106 107 if(pet->getVictim())108 pet->AttackStop();109 110 107 if(pet->GetTypeId() != TYPEID_PLAYER) 111 108 { … … 124 121 else // charmed player 125 122 { 123 if(pet->getVictim() && pet->getVictim() != TargetUnit) 124 pet->AttackStop(); 125 126 126 pet->Attack(TargetUnit,true); 127 127 pet->SendPetAIReaction(guid1);