From 0cebc5bbbad8e17ce3428979ca8a4f930dcd3899 Mon Sep 17 00:00:00 2001 From: AbraKabastard <80sVillain@gmail.com> Date: Thu, 9 May 2019 23:08:16 -0300 Subject: [PATCH] Core/Commands: Fix .cheat god command letting you die author: jackpoz @ tc --- src/game/Unit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a54c5737..71f7f5ee 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -931,10 +931,10 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam else if (IsAIEnabled) ToCreature()->AI()->DamageDealt(victim, damage, damagetype); - if (victim->GetTypeId() == TYPEID_PLAYER && this != victim) + if (victim->GetTypeId() == TYPEID_PLAYER) { // Signal to pets that their owner was attacked - except when DOT. - if (damagetype != DOT) + if (this != victim && damagetype != DOT) { Pet* pet = victim->ToPlayer()->GetPet();