aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormik1893 <michele.roscelli@gmail.com>2016-05-15 10:26:27 +0100
committerShauren <shauren.trinity@gmail.com>2016-05-15 11:26:27 +0200
commit4de1426d080084667da83a60857ee9c0492086fd (patch)
treeb9c6f18f0d28d005b2ee597fe79aa91cba212f25 /src
parent0ab6ecbdc69af4afab4b0596808abac96084186c (diff)
Core/Unit: Pet shouldn't be notified for DOT damage on the owner (#17133)
- Fix by @MrSmite - Closes #16894
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 0e9aa4395a3..eb5f9f1eb89 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -599,11 +599,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;