*PetAI update;

Pets now start attacking their owners target in defensive mode as soon as the hunter does (3.0.2 change)
Correctly chase target if attack command was given after pet has set gaze on target from defensive mode with chase = false

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2009-10-09 21:34:23 +02:00
parent c13da994ef
commit afba628188
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -323,6 +323,10 @@ Unit *PetAI::SelectNextTarget()
if (me->GetCharmerOrOwner()->getAttackerForHelper()) if (me->GetCharmerOrOwner()->getAttackerForHelper())
return me->GetCharmerOrOwner()->getAttackerForHelper(); return me->GetCharmerOrOwner()->getAttackerForHelper();
// 3.0.2 - Pets now start attacking their owners target in defensive mode as soon as the hunter does
if (me->GetCharmerOrOwner()->getVictim())
return me->GetCharmerOrOwner()->getVictim();
// Default // Default
return NULL; return NULL;
} }
+1 -1
View File
@@ -143,7 +143,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
pet->clearUnitState(UNIT_STAT_FOLLOW); pet->clearUnitState(UNIT_STAT_FOLLOW);
// This is true if pet has no target or has target but targets differs. // This is true if pet has no target or has target but targets differs.
if(pet->getVictim() != TargetUnit) if(pet->getVictim() != TargetUnit || ( pet->getVictim() == TargetUnit && !pet->GetCharmInfo()->IsCommandAttack() ))
{ {
if (pet->getVictim()) if (pet->getVictim())
pet->AttackStop(); pet->AttackStop();