diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2015-07-05 04:03:36 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2015-07-05 04:03:36 +0200 |
| commit | d418ae54a446472d64f2e198a61bebef205cbb2f (patch) | |
| tree | fd6fb6dc363bf7a7ae1ebf8dfd4bbb18ea63f95d /src/server/game/Entities | |
| parent | 5624f71b62919faac3d4273ce1f8bcd05eb2496b (diff) | |
Core: White space CleanUp
Diffstat (limited to 'src/server/game/Entities')
| -rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 1a6710ff1ac..81b29cdd400 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -1408,11 +1408,11 @@ bool Creature::CanStartAttack(Unit const* who, bool force) const return false; // This set of checks is should be done only for creatures - if ((HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC) && who->GetTypeId() != TYPEID_PLAYER) // flag is valid only for non player characters + if ((HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC) && who->GetTypeId() != TYPEID_PLAYER) // flag is valid only for non player characters || (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) && who->GetTypeId() == TYPEID_PLAYER) // immune to PC and target is a player, return false || (who->GetOwner() && who->GetOwner()->GetTypeId() == TYPEID_PLAYER && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC))) // player pets are immune to pc as well return false; - + // Do not attack non-combat pets if (who->GetTypeId() == TYPEID_UNIT && who->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET) return false; |
