aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 53b3d8cf569..e107eb90f55 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -212,7 +212,7 @@ void Unit::Update( uint32 p_time )
_UpdateSpells( p_time );
// update combat timer only for players and pets
- if (isInCombat() && (GetTypeId() == TYPEID_PLAYER || ((Creature*)this)->isPet() || ((Creature*)this)->isCharmed()))
+ if (isInCombat() && IsControlledByPlayer())
{
// Check UNIT_STAT_MELEE_ATTACKING or UNIT_STAT_CHASE (without UNIT_STAT_FOLLOW in this case) so pets can reach far away
// targets without stopping half way there and running off.