From 0f030d61cfd2f97a82cf378e8ebdfbed0350852b Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 1 Dec 2021 22:59:43 -0500 Subject: [PATCH] Core/Commands: Fix .cheat god command letting you die Port From (https://github.com/TrinityCore/TrinityCore/commit/519e3c9ab718ce50dbaf66a50d15f5ead2dc9885) --- Source/Game/Entities/Unit/Unit.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Game/Entities/Unit/Unit.cs b/Source/Game/Entities/Unit/Unit.cs index 5692f4de1..3c88fcb51 100644 --- a/Source/Game/Entities/Unit/Unit.cs +++ b/Source/Game/Entities/Unit/Unit.cs @@ -2366,10 +2366,10 @@ namespace Game.Entities // Hook for OnDamage Event Global.ScriptMgr.OnDamage(attacker, victim, ref damage); - if (victim.IsTypeId(TypeId.Player) && attacker != victim) + if (victim.IsTypeId(TypeId.Player)) { // Signal to pets that their owner was attacked - except when DOT. - if (damagetype != DamageEffectType.DOT) + if (attacker != victim && damagetype != DamageEffectType.DOT) { foreach (Unit controlled in victim.m_Controlled) {