aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2019-04-27 14:40:28 +0200
committerjackpoz <giacomopoz@gmail.com>2019-04-27 14:40:28 +0200
commitf26f716714fefa2af4c6e3eea263206682d45236 (patch)
tree98f1c563328a71a72a75c9aadf9451736ade9a05 /src
parent1c833f28e471e3787f1d328e44af5f065ad9ca8c (diff)
Core/Commands: Fix .cheat god command letting you die
Fix .cheat god command still letting you die with Area Aura like Slime near Thaddius, broken since 777b287dff8bce806849a26d59fe40f864c385ed
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index b91a4af8f2a..d86334afc89 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -651,10 +651,10 @@ bool Unit::HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel) cons
// Hook for OnDamage Event
sScriptMgr->OnDamage(attacker, victim, damage);
- if (victim->GetTypeId() == TYPEID_PLAYER && attacker != victim)
+ if (victim->GetTypeId() == TYPEID_PLAYER)
{
// Signal to pets that their owner was attacked - except when DOT.
- if (damagetype != DOT)
+ if (attacker != victim && damagetype != DOT)
{
for (Unit* controlled : victim->m_Controlled)
if (Creature* cControlled = controlled->ToCreature())