Core/Creature: Do not attack non-combat pets.

Fixes an issue where non-combat pets were aggroing other creatures
This commit is contained in:
Nay
2011-10-01 16:57:10 +01:00
parent 5cf9693542
commit 8373e6c32e
2 changed files with 8 additions and 1 deletions
@@ -1411,6 +1411,10 @@ bool Creature::canStartAttack(Unit const* who, bool force) const
if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE))
return false;
// Do not attack non-combat pets
if (who->GetTypeId() == TYPEID_UNIT && who->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET)
return false;
if (!canFly() && (GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE + m_CombatDistance))
//|| who->IsControlledByPlayer() && who->IsFlying()))