aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 6f23f57b3c7..fec094e2458 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -623,11 +623,14 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
if (victim->GetTypeId() == TYPEID_PLAYER && this != victim)
{
- // Signal to pets that their owner was attacked
- Pet* pet = victim->ToPlayer()->GetPet();
+ // Signal to pets that their owner was attacked - except when DOT.
+ if (damagetype != DOT)
+ {
+ Pet* pet = victim->ToPlayer()->GetPet();
- if (pet && pet->IsAlive())
- pet->AI()->OwnerAttackedBy(this);
+ if (pet && pet->IsAlive())
+ pet->AI()->OwnerAttackedBy(this);
+ }
if (victim->ToPlayer()->GetCommandStatus(CHEAT_GOD))
return 0;